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.

A324294 a(n) = A002487(1+sigma(n)).

Original entry on oeis.org

1, 1, 3, 1, 3, 5, 4, 1, 3, 7, 5, 7, 4, 7, 7, 1, 7, 3, 8, 13, 6, 11, 7, 9, 1, 13, 11, 10, 5, 15, 6, 1, 9, 11, 9, 7, 10, 9, 10, 19, 13, 11, 12, 21, 13, 15, 9, 11, 7, 9, 15, 16, 11, 13, 15, 13, 14, 19, 9, 29, 6, 11, 18, 1, 21, 19, 14, 7, 11, 19, 15, 9, 18, 17, 11, 22, 11, 29, 14, 25, 9, 7, 21, 16, 19, 17, 13, 31, 19, 29, 13, 29, 8, 19, 13, 13, 16
Offset: 1

Views

Author

Antti Karttunen, Feb 22 2019

Keywords

Crossrefs

Programs

  • Mathematica
    A002487[m_] := Module[{a = 1, b = 0, n = m}, While[n > 0, If[OddQ[n], b = a + b, a = a + b]; n = Floor[n/2]]; b];
    a[n_] := A002487[1 + DivisorSigma[1, n]];
    Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Mar 11 2023 *)
  • PARI
    A002487(n) = { my(s=sign(n), a=1, b=0); n = abs(n); while(n>0, if(bitand(n, 1), b+=a, a+=b); n>>=1); (s*b); };
    A324294(n) = A002487(1+sigma(n));
    
  • Python
    from functools import reduce
    from sympy import divisor_sigma
    def A324294(n): return reduce(lambda x,y:(x[0],x[0]+x[1]) if int(y) else (x[0]+x[1],x[1]),bin(divisor_sigma(n)+1)[-1:1:-1],(1,0))[1] # Chai Wah Wu, Jun 19 2022

Formula

a(n) = A002487(1+sigma(n)).
a(2^n) = 1 for all n >= 0, but also for some other numbers, e.g., a(25) = 1.