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.

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).