login
a(n) = a(2^n mod n) + a(3^n mod n), with a(0) = 1.
0

%I #26 Nov 04 2024 18:12:33

%S 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,

%T 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,

%U 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

%N a(n) = a(2^n mod n) + a(3^n mod n), with a(0) = 1.

%C Conjectured to contain all positive integers. Here are the indexes where each of the first few positive integers appear:

%C 1: 0

%C 2: 1

%C 3: 2, 4, 8, 16, 32, ... (2^k, k > 0)

%C 4: 3, 9, ...

%C 5: 20, 40, 80, 272, 320, 328, ...

%C 6: 81, 66469, 144937, ...

%C 7: 5, 6, 7, 10, 11, 12, 13,... (all primes appear except 2 and 3)

%C 8: 27, 301, 729, 1099, 2107, 2187, 85085, 1594323, ...

%C Most solutions to a(n) = 5 seem to be divisible by 5 and all of them seem to be even. Why?

%C Are 3 and 9 the only solutions to a(n) = 4?

%H John Tyler Rascoe, <a href="/A374911/b374911.txt">Table of n, a(n) for n = 0..10000</a>

%F a(p) = 7 for primes p except 2 and 3.

%F a(2^n) = 3 for n > 0.

%t a[0]=1; a[n_]:=a[PowerMod[2,n,n]]+a[PowerMod[3,n,n]]; Array[a,89,0] (* _Stefano Spezia_, Jul 23 2024 *)

%o (Python)

%o def a(n):

%o return 1 if n == 0 else a(pow(2, n, n)) + a(pow(3, n, n))

%o (PARI) a(n) = if (n==0, 1, a(lift(Mod(2,n)^n)) + a(lift(Mod(3,n)^n))); \\ _Michel Marcus_, Jul 25 2024

%Y Cf. A000079, A015910, A066601.

%K nonn,easy,changed

%O 0,2

%A _Bryle Morga_, Jul 23 2024