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.

A122895 Characteristic function of natural numbers with number of divisors equal to a Fibonacci number.

Original entry on oeis.org

1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1
Offset: 1

Views

Author

Giovanni Teofilatto, Oct 24 2006

Keywords

Crossrefs

Programs

  • Mathematica
    fibQ[n_] := IntegerQ@ Sqrt[5*n^2+4] || IntegerQ@ Sqrt[5*n^2-4]; Boole[ fibQ /@ DivisorSigma[0, Range[103]]] (* Giovanni Resta, Mar 10 2017 *)
  • PARI
    isfib(n) = my(k=n^2); k+=(k+1)<<2; issquare(k) || (n>0 && issquare(k-8));
    a(n) = isfib(numdiv(n)); \\ Michel Marcus, Mar 10 2017
    
  • Python
    from sympy import divisor_count
    from sympy.ntheory.primetest import is_square
    def A122895(n): return int(is_square(m:=5*int(divisor_count(n))**2-4) or is_square(m+8)) # Chai Wah Wu, Oct 10 2023

Formula

a(n) = A010056(A000005(n)). - Chayim Lowen, Aug 01 2015

Extensions

a(0)=0 removed from data by Michel Marcus, Mar 10 2017