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.

This page as a plain text file.
%I A122895 #28 Oct 10 2023 12:20:52
%S A122895 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,
%T A122895 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,
%U A122895 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
%N A122895 Characteristic function of natural numbers with number of divisors equal to a Fibonacci number.
%H A122895 Antti Karttunen, <a href="/A122895/b122895.txt">Table of n, a(n) for n = 1..10000</a>
%H A122895 <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>
%H A122895 <a href="/index/Eu#epf">Index entries for sequences computed from exponents in factorization of n</a>
%F A122895 a(n) = A010056(A000005(n)). - _Chayim Lowen_, Aug 01 2015
%t A122895 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 *)
%o A122895 (PARI) isfib(n) = my(k=n^2); k+=(k+1)<<2; issquare(k) || (n>0 && issquare(k-8));
%o A122895 a(n) = isfib(numdiv(n)); \\ _Michel Marcus_, Mar 10 2017
%o A122895 (Python)
%o A122895 from sympy import divisor_count
%o A122895 from sympy.ntheory.primetest import is_square
%o A122895 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
%Y A122895 Cf. A000005, A010056, A115568, A123193, A123240.
%K A122895 easy,nonn
%O A122895 1,1
%A A122895 _Giovanni Teofilatto_, Oct 24 2006
%E A122895 a(0)=0 removed from data by _Michel Marcus_, Mar 10 2017