login
A086360
The n-th primorial number reduced modulo 9.
3
1, 2, 6, 3, 3, 6, 6, 3, 3, 6, 3, 3, 3, 6, 6, 3, 6, 3, 3, 3, 6, 6, 6, 3, 6, 6, 3, 3, 6, 6, 3, 3, 6, 3, 3, 6, 6, 6, 6, 3, 6, 3, 3, 6, 6, 3, 3, 3, 3, 6, 6, 3, 6, 6, 3, 6, 3, 6, 6, 6, 3, 3, 6, 6, 3, 3, 6, 6, 6, 3, 3, 6, 3, 3, 3, 3, 6, 3, 3, 6, 6, 3, 3, 6, 6, 6, 3, 6
OFFSET
0,2
COMMENTS
a(n) is the fixed point reached by decimal-digit-sum-function (A007953), when starting the iteration from the value of the n-th primorial, A002110(n). - The (edited) original definition of the sequence, which is equal to a simple definition a(n) = A002110(n) mod 9, because taking the decimal digit sum preserves congruence modulo 9. - Antti Karttunen, Nov 14 2024
Only a(0)=1 and a(1)=2; each subsequent term is either a 3 or a 6.
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..19683 (terms 1..10000 from Nathaniel Johnston)
FORMULA
a(n) = A010878(A002110(n)) = A002110(n) mod 9.
a(n) = A010888(A002110(n)).
EXAMPLE
For n=7, 7th primorial = 510510, list of iterated digit sums is {510510,12,3}, thus a(7)=3.
MAPLE
A086360 := proc(n) option remember: if(n=1)then return 2:fi: return ithprime(n)*procname(n-1) mod 9: end: seq(A086360(n), n=1..100); # Nathaniel Johnston, May 04 2011
MATHEMATICA
sud[x_] := Apply[Plus, DeleteCases[IntegerDigits[x], 0]] q[x_] := Apply[Times, Table[Prime[w], {w, 1, x}]] Table[FixedPoint[sud, q[w]], {w, 1, 128}]
PROG
(PARI)
up_to = 19683;
A086360list(up_to_n) = { my(m=9, v=vector(1+up_to_n), pr=1); v[1] = 1; for(n=1, up_to_n, pr = (pr*prime(n))%m; v[1+n] = pr); (v); };
v086360 = A086360list(up_to);
A086360(n) = v086360[1+n]; \\ Antti Karttunen, Nov 14 2024
KEYWORD
easy,nonn
AUTHOR
Labos Elemer, Jul 21 2003
EXTENSIONS
Term a(0)=1 prepended, old definition moved to comments and replaced with one of the formulas, keyword:base removed because not really base-dependent - Antti Karttunen, Nov 14 2024
STATUS
approved