login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Completely multiplicative with a(p) = A002487(p).
3

%I #13 May 19 2023 01:51:25

%S 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 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 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 Completely multiplicative with a(p) = A002487(p).

%C Provided that the conjecture given in A261179 holds, then for all n >= 1, A007814(a(n)) = A007949(n).

%H Antti Karttunen, <a href="/A318509/b318509.txt">Table of n, a(n) for n = 1..65537</a>

%H <a href="/index/St#Stern">Index entries for sequences related to Stern's sequences</a>

%o (PARI)

%o 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(n) = { my(f=factor(n)); for (i=1, #f~, f[i, 1] = A002487(f[i, 1])); factorback(f); };

%o (Python)

%o from math import prod

%o from functools import reduce

%o from sympy import factorint

%o 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 Cf. A002487, A261179, A318510.

%Y Cf. also A318307.

%K nonn,mult

%O 1,3

%A _Antti Karttunen_, Aug 30 2018