A122895 Characteristic function of natural numbers with number of divisors equal to a Fibonacci number.
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
Links
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
Extensions
a(0)=0 removed from data by Michel Marcus, Mar 10 2017