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.

Showing 1-2 of 2 results.

A318307 Multiplicative with a(p^e) = 2^A002487(e).

Original entry on oeis.org

1, 2, 2, 2, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 4, 2, 2, 4, 2, 4, 4, 4, 2, 8, 2, 4, 4, 4, 2, 8, 2, 8, 4, 4, 4, 4, 2, 4, 4, 8, 2, 8, 2, 4, 4, 4, 2, 4, 2, 4, 4, 4, 2, 8, 4, 8, 4, 4, 2, 8, 2, 4, 4, 4, 4, 8, 2, 4, 4, 8, 2, 8, 2, 4, 4, 4, 4, 8, 2, 4, 2, 4, 2, 8, 4, 4, 4, 8, 2, 8, 4, 4, 4, 4, 4, 16, 2, 4, 4, 4, 2, 8, 2, 8, 8
Offset: 1

Views

Author

Antti Karttunen, Aug 29 2018

Keywords

Crossrefs

Differs from A037445 for the first time at n=32, where a(32) = 8, while A037445(32) = 4.

Programs

  • Mathematica
    f[m_] := Module[{a = 1, b = 0, n = m}, While[n > 0, If[OddQ[n], b += a, a += b]; n = Floor[n/2]]; b]; Array[Times @@ Map[2^f@ # &, FactorInteger[#][[All, -1]] ] - Boole[# == 1] &, 105] (* after Jean-François Alcover at A002487 *)
  • PARI
    A002487(n) = { my(a=1, b=0); while(n>0, if(bitand(n, 1), b+=a, a+=b); n>>=1); (b); }; \\ From A002487
    A318307(n) = factorback(apply(e -> 2^A002487(e),factor(n)[,2]));
    
  • Python
    from functools import reduce
    from sympy import factorint
    def A318307(n): return 1<Chai Wah Wu, May 18 2023

Formula

a(n) = 2^A318306(n).
a(n) = A061142(A318470(n)).
a(n^2) = a(n).
a(A003557(n^2)) = A318316(n).
Dirichlet convolution square of A318667(n)/A317934(n).

A318322 Additive with a(p^e) = A007306(e).

Original entry on oeis.org

0, 1, 1, 2, 1, 2, 1, 3, 2, 2, 1, 3, 1, 2, 2, 3, 1, 3, 1, 3, 2, 2, 1, 4, 2, 2, 3, 3, 1, 3, 1, 4, 2, 2, 2, 4, 1, 2, 2, 4, 1, 3, 1, 3, 3, 2, 1, 4, 2, 3, 2, 3, 1, 4, 2, 4, 2, 2, 1, 4, 1, 2, 3, 5, 2, 3, 1, 3, 2, 3, 1, 5, 1, 2, 3, 3, 2, 3, 1, 4, 3, 2, 1, 4, 2, 2, 2, 4, 1, 4, 2, 3, 2, 2, 2, 5, 1, 3, 3, 4, 1, 3, 1, 4, 3
Offset: 1

Views

Author

Antti Karttunen, Aug 31 2018

Keywords

Crossrefs

Differs from A122810 for the first time at n=48, where a(48) = 4, while A122810(48) = 5.

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
    A007306(n) = if(!n,1,A002487(n+n-1));
    A318322(n) = vecsum(apply(e -> A007306(e),factor(n)[,2]));
    
  • Python
    from functools import reduce
    from sympy import factorint
    def A318322(n): return sum(sum(reduce(lambda x,y:(x[0],sum(x)) if int(y) else (sum(x),x[1]),bin((e<<1)-1)[-1:2:-1],(1,0))) for e in factorint(n).values()) # Chai Wah Wu, May 18 2023

Formula

a(n) = A007814(A318316(n)).
Showing 1-2 of 2 results.