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.

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

Original entry on oeis.org

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, 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, 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
Offset: 1

Views

Author

Antti Karttunen, Aug 30 2018

Keywords

Comments

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

Crossrefs

Cf. also A318307.

Programs

  • PARI
    A002487(n) = { my(a=1, b=0); while(n>0, if(bitand(n, 1), b+=a, a+=b); n>>=1); (b); }; \\ From A002487
    A318509(n) = { my(f=factor(n)); for (i=1, #f~, f[i, 1] = A002487(f[i, 1])); factorback(f); };
    
  • Python
    from math import prod
    from functools import reduce
    from sympy import factorint
    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