cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A292384 a(1) = 1; for n > 1, a(n) = 4*a(A252463(n)) + (n mod 4).

This page as a plain text file.
%I A292384 #14 May 08 2020 16:54:37
%S A292384 1,6,27,24,109,110,439,96,97,438,1759,440,7037,1758,443,384,28149,390,
%T A292384 112599,1752,1753,7038,450399,1760,389,28150,387,7032,1801597,1774,
%U A292384 7206391,1536,7033,112598,1775,1560,28825565,450398,28155,7008,115302261,7014,461209047,28152,1761,1801598,1844836191,7040,1557,1558,112603,112600
%N A292384 a(1) = 1; for n > 1, a(n) = 4*a(A252463(n)) + (n mod 4).
%C A292384 a(n) encodes in its base-4 representation the succession of modulo 4 residues obtained when map x -> A252463(x), starting from x=n, is iterated down to the eventual 1.
%H A292384 Antti Karttunen, <a href="/A292384/b292384.txt">Table of n, a(n) for n = 1..1024</a>
%F A292384 a(1) = 1; for n > 1, a(n) = 4*a(A252463(n)) + A010873(n).
%o A292384 (Scheme, with memoization-macro definec)
%o A292384 (definec (A292384 n) (if (= 1 n) n (+ (modulo n 4) (* 4 (A292384 (A252463 n))))))
%o A292384 (Python)
%o A292384 from sympy.core.cache import cacheit
%o A292384 from sympy import factorint, prevprime, prod
%o A292384 def a064989(n):
%o A292384     f = factorint(n)
%o A292384     return 1 if n == 1 else prod(prevprime(i)**f[i] for i in f if i != 2)
%o A292384 def a252463(n): return 1 if n==1 else n//2 if n%2==0 else a064989(n)
%o A292384 @cacheit
%o A292384 def a(n): return 1 if n==1 else 4*a(a252463(n)) + n%4
%o A292384 print([a(n) for n in range(1, 51)]) # _Indranil Ghosh_, Sep 21 2017
%Y A292384 Cf. A010873, A252463, A292380, A292381, A292382, A292383.
%Y A292384 Cf. also A292243.
%K A292384 nonn,base
%O A292384 1,2
%A A292384 _Antti Karttunen_, Sep 15 2017