login
A374911
a(n) = a(2^n mod n) + a(3^n mod n), with a(0) = 1.
0
1, 2, 3, 4, 3, 7, 7, 7, 3, 4, 7, 7, 7, 7, 7, 10, 3, 7, 11, 7, 5, 10, 7, 7, 7, 18, 7, 8, 21, 7, 7, 7, 3, 11, 7, 18, 25, 7, 7, 11, 5, 7, 17, 7, 10, 18, 7, 7, 14, 14, 21, 11, 10, 7, 29, 14, 7, 11, 7, 7, 13, 7, 7, 11, 3, 17, 7, 7, 10, 11, 21, 7, 7, 7, 7, 21, 10, 32, 11, 7, 5, 6, 7, 7, 14, 10, 7, 11, 19
OFFSET
0,2
COMMENTS
Conjectured to contain all positive integers. Here are the indexes where each of the first few positive integers appear:
1: 0
2: 1
3: 2, 4, 8, 16, 32, ... (2^k, k > 0)
4: 3, 9, ...
5: 20, 40, 80, 272, 320, 328, ...
6: 81, 66469, 144937, ...
7: 5, 6, 7, 10, 11, 12, 13,... (all primes appear except 2 and 3)
8: 27, 301, 729, 1099, 2107, 2187, 85085, 1594323, ...
Most solutions to a(n) = 5 seem to be divisible by 5 and all of them seem to be even. Why?
Are 3 and 9 the only solutions to a(n) = 4?
FORMULA
a(p) = 7 for primes p except 2 and 3.
a(2^n) = 3 for n > 0.
MATHEMATICA
a[0]=1; a[n_]:=a[PowerMod[2, n, n]]+a[PowerMod[3, n, n]]; Array[a, 89, 0] (* Stefano Spezia, Jul 23 2024 *)
PROG
(Python)
def a(n):
return 1 if n == 0 else a(pow(2, n, n)) + a(pow(3, n, n))
(PARI) a(n) = if (n==0, 1, a(lift(Mod(2, n)^n)) + a(lift(Mod(3, n)^n))); \\ Michel Marcus, Jul 25 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Bryle Morga, Jul 23 2024
STATUS
approved