login
A122895
Characteristic function of natural numbers with number of divisors equal to a Fibonacci number.
3
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,1
FORMULA
a(n) = A010056(A000005(n)). - Chayim Lowen, Aug 01 2015
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 *)
PROG
(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
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Giovanni Teofilatto, Oct 24 2006
EXTENSIONS
a(0)=0 removed from data by Michel Marcus, Mar 10 2017
STATUS
approved