Numbers k with 4 zeros in a fundamental period of A000129 mod k.

22 views
Skip to first unread message

Davide Rotondo

unread,
Jan 9, 2026, 6:22:50 AM (11 days ago) Jan 9
to SeqFan
A309585
Numbers k with 4 zeros in a fundamental period of A000129 mod k.
5, 13, 25, 29, 37, 53, 61, 65, 101, 109, 125, 137, 145, 149, 157, 169, 173, 181, 185, 197, 229, ...

A064848
Period of the continued fraction for sqrt(2)*n.
1, 2, 2, 4, 1, 2, 4, 4, 10, 2, 10, 2, 5, 4, 8, 12, 2, 6, 14, 8, 8, 6, 16, 4, 13, 10, 26, 8, 1, 8, 24, 24, 6, 2, 2, 6, 15, 18, 16, 20, 4, 8, 30, 6, 10, 16, 28, 8, 36, 22, 2, 20, 19, 30, 10, 12, 14, 2, 14, 8, 25, 20, 4, 48, 13, 6, 54, 2, 32, 2, 52, 16, 30, 26, 40, 10, 6, 16, 20, 36, 78, 4,...

You can see that the values ​​in the sequence A309585 correspond to the n values ​​of A0684848 such that A0684848(n) is odd.

If I'm right this comment there isn't in A309585.
What do you think?

All good

Davide

Allan Wechsler

unread,
Jan 11, 2026, 11:30:47 PM (9 days ago) Jan 11
to seq...@googlegroups.com
Davide, is this a pure numerical observation, or do you have a theoretical reason for thinking it might be true? I mean, yes, both sequences have to do with continued fractions involving sqrt(2), but in general we don't add comments for pure empirical observations. If you can prove your statement, that's a worthwhile comment.
-- Allan

--
You received this message because you are subscribed to the Google Groups "SeqFan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to seqfan+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/seqfan/bd659a42-3ccd-4a06-8df5-5012d2b02914n%40googlegroups.com.

Davide Rotondo

unread,
Jan 12, 2026, 2:42:48 AM (9 days ago) Jan 12
to seq...@googlegroups.com

Gareth McCaughan

unread,
Jan 12, 2026, 7:18:56 AM (8 days ago) Jan 12
to seq...@googlegroups.com
On 09/01/2026 11:22, Davide Rotondo wrote:
> A309585
> Numbers k with 4 zeros in a fundamental period of A000129 mod k.
> 5, 13, 25, 29, 37, 53, 61, 65, 101, 109, 125, 137, 145, 149, 157, 169,
> 173, 181, 185, 197, 229, ...
>
> A064848
> Period of the continued fraction for sqrt(2)*n.
> 1, 2, 2, 4, 1, 2, 4, 4, 10, 2, 10, 2, 5, 4, 8, 12, 2, 6, 14, 8, 8, 6,
> 16, 4, 13, 10, 26, 8, 1, 8, 24, 24, 6, 2, 2, 6, 15, 18, 16, 20, 4, 8,
> 30, 6, 10, 16, 28, 8, 36, 22, 2, 20, 19, 30, 10, 12, 14, 2, 14, 8, 25,
> 20, 4, 48, 13, 6, 54, 2, 32, 2, 52, 16, 30, 26, 40, 10, 6, 16, 20, 36,
> 78, 4,...
>
> You can see that the values ​​in the sequence A309585 correspond to
> the n values ​​of A0684848 such that A0684848(n) is odd.
Davide's conjecture is true.

The comments for A309585 say that the sequence also consists of "numbers
k such that A214028(k) is odd", which is to say numbers k such that the
first n for which k | A000129(n) is odd.

In turn, A000129(n) can be described as the denominator of the nth
convergent to the continued fraction of sqrt(2), so (assuming that
comment is correct; it doesn't come with an explanation or a reference)
A309585 consists of numbers k such that the first n for which k divides
the denominator of the n'th convergent to the continued fraction for
sqrt(2) is odd.

So Davide's conjecture is this: let the convergents to the continued
fraction for sqrt(2) be p(n)/q(n); then the first n such that k|q(n) is
odd iff the period of the continued fraction for k.sqrt(2) is odd.

It's also well known that the period of the continued fraction for
sqrt(D) is odd iff the equation x^2-Dy2=-1 has integer solutions. So the
continued fraction for k sqrt(2) has odd period iff x^2-(2k^2)y^2 can be
-1, or equivalently if x^2-2y^2 can be -1 _with y being a multiple of k_.

So Davide's conjecture is this: the first n such that k|q(n) is odd iff
there are solutions to x^2-2y^2=-1 for which k|y.

But now remember the following: if we write (1+sqrt(2))^m =
A(m)+B(m)sqrt(2) then (1) these correspond precisely to the c.f.
convergents for sqrt(2) so A(m)=p(m) and B(m)=q(m), and (2) they also
correspond precisely to the solutions to |x^2-2y^2|=1, and more
specifically A(m)^2-2B(m)^2 is +1 when m is even and -1 when m is odd.

And so we're pretty much done. There are solutions to x^2-2y^2=-1 for
which k|y <=> there are odd m for which k|B(m) <=> the _first_ m for
which k|B(m) is odd <=> the first n for which k|q(n) is odd. The only
thing there that we haven't proved yet is that if _some_ m with k|B(m)
is odd then _the first_ m with k|B(m) is odd. But this is
straightforward because in fact a|b => B(a)|B(b). (A similar
relationship for the Fibonacci numbers is well known, and this one for
the Pell numbers is true for similar reasons.)

--
g

Davide Rotondo

unread,
Jan 12, 2026, 8:20:44 AM (8 days ago) Jan 12
to seq...@googlegroups.com
You are great Gareth!

Davide

--
You received this message because you are subscribed to the Google Groups "SeqFan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to seqfan+un...@googlegroups.com.

Davide Rotondo

unread,
Jan 12, 2026, 11:41:32 AM (8 days ago) Jan 12
to seq...@googlegroups.com
Dear Gareth and dear seq fans, another thing, I noticed that primes congruent to 13 or 37 mod 120 are part of the list. Maybe it's trivial but I think it's an interesting thing. I verified up to 10000. Please let me know.

Davide
Reply all
Reply to author
Forward
0 new messages