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.
%I A318509 #13 May 19 2023 01:51:25 %S A318509 1,1,2,1,3,2,3,1,4,3,5,2,5,3,6,1,5,4,7,3,6,5,7,2,9,5,8,3,7,6,5,1,10,5, %T A318509 9,4,11,7,10,3,11,6,13,5,12,7,9,2,9,9,10,5,13,8,15,3,14,7,11,6,9,5,12, %U A318509 1,15,10,11,5,14,9,13,4,15,11,18,7,15,10,13,3,16,11,19,6,15,13,14,5,17,12,15,7,10,9,21,2,11,9,20,9,19,10,17,5,18 %N A318509 Completely multiplicative with a(p) = A002487(p). %C A318509 Provided that the conjecture given in A261179 holds, then for all n >= 1, A007814(a(n)) = A007949(n). %H A318509 Antti Karttunen, <a href="/A318509/b318509.txt">Table of n, a(n) for n = 1..65537</a> %H A318509 <a href="/index/St#Stern">Index entries for sequences related to Stern's sequences</a> %o A318509 (PARI) %o A318509 A002487(n) = { my(a=1, b=0); while(n>0, if(bitand(n, 1), b+=a, a+=b); n>>=1); (b); }; \\ From A002487 %o A318509 A318509(n) = { my(f=factor(n)); for (i=1, #f~, f[i, 1] = A002487(f[i, 1])); factorback(f); }; %o A318509 (Python) %o A318509 from math import prod %o A318509 from functools import reduce %o A318509 from sympy import factorint %o A318509 def A318509(n): return prod(sum(reduce(lambda x,y:(x[0],x[0]+x[1]) if int(y) else (x[0]+x[1],x[1]),bin(p)[-1:2:-1],(1,0)))**e for p, e in factorint(n).items()) # _Chai Wah Wu_, May 18 2023 %Y A318509 Cf. A002487, A261179, A318510. %Y A318509 Cf. also A318307. %K A318509 nonn,mult %O A318509 1,3 %A A318509 _Antti Karttunen_, Aug 30 2018