A039972 An example of a d-perfect sequence: a(n) = A007317(n) mod 3.
1, 2, 2, 0, 0, 2, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 1, 1, 0, 0, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 1, 1, 0, 0, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 0, 0, 2, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1
Keywords
Links
- Antti Karttunen, Table of n, a(n) for n = 1..6561
- D. Kohel, S. Ling and C. Xing, Explicit Sequence Expansions, in Sequences and their Applications, C. Ding, T. Helleseth, and H. Niederreiter, eds., Proceedings of SETA'98 (Singapore, 1998), 308-317, 1999. DOI: 10.1007/978-1-4471-0551-0_23
Programs
-
PARI
write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); } A039972_as_a_vector(size)= { my(A=vector(size)); for(j=1, size, A[j]=1+sum(k=1, j-1, A[k]*A[j-k])); apply(n->(n%3),A); }; \\ After Michael Somos' May 23 2005 code for A007317 and Christian G. Bower's formula for A039972. write_to_bfile(1,A039972_as_a_vector(6561),"b039972_upto6561.txt"); \\ Antti Karttunen, Aug 15 2017
Formula
a(n) = A007317(n) mod 3. - Christian G. Bower, Jun 12 2005
Extensions
More terms from Christian G. Bower, Jun 12 2005
Formula added to the name by Antti Karttunen, Aug 15 2017
Comments