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.

A102460 a(n) = 1 if n is a Lucas number, else a(n) = 0.

This page as a plain text file.
%I A102460 #43 Jun 14 2024 01:49:01
%S A102460 0,1,1,1,1,0,0,1,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,
%T A102460 0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
%U A102460 0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
%N A102460 a(n) = 1 if n is a Lucas number, else a(n) = 0.
%C A102460 From _Hieronymus Fischer_, Jul 02 2007: (Start)
%C A102460 a(n) is the number of nonnegative integer solutions to 25*x^4-10*n^2*x^2+n^4-16=0.
%C A102460 a(n)=1 if and only if there is an integer m such that x=n is a root of p(x)=x^4-10*m^2*x^2+25*m^4-16.
%C A102460 For n>=3: a(n)=1 iff floor(log_phi(n+1/2))=ceiling(log_phi(n-1/2)). (End)
%H A102460 Antti Karttunen, <a href="/A102460/b102460.txt">Table of n, a(n) for n = 0..65537</a>
%H A102460 Casey Mongoven, <a href="http://caseymongoven.com/catalogue/b199.html">Lucas Binary no. 1</a>; electronic music created with this sequence.
%H A102460 <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>
%F A102460 From _Hieronymus Fischer_, Jul 02 2007: (Start)
%F A102460 G.f.: g(x) = Sum_{k>=0} x^A000032(k).
%F A102460 a(n) = 1+floor(arcsinh(n/2)/log(phi))-ceiling(arccosh(n/2)/log(phi)) for n>=3, where phi=(1+sqrt(5))/2.
%F A102460 a(n) = 1+A130241(n)-A130242(n) for n>=3.
%F A102460 a(n) = 1+A130247(n)-A130242(n) for n=>2.
%F A102460 a(n) = A130245(n)-A130245(n-1) for n>=1.
%F A102460 For n>=3: a(n)=1 iff A130241(n)=A130242(n). (End)
%t A102460 {0}~Join~ReplacePart[ConstantArray[0, Last@ #], Map[# -> 1 &, #]] &@ Array[LucasL, 11, 0] (* _Michael De Vlieger_, Nov 22 2017 *)
%t A102460 With[{nn=130,lc=LucasL[Range[0,20]]},Table[If[MemberQ[lc,n],1,0],{n,0,nn}]] (* _Harvey P. Dale_, Jul 03 2022 *)
%o A102460 (PARI) a(n)=my(f=factor(25*'x^4-10*n^2*'x^2+n^4-16)[,1]); sum(i=1,#f, poldegree(f[i])==1 && polcoeff(f[i],0)<=0) \\ _Charles R Greathouse IV_, Nov 06 2014
%o A102460 (PARI) A102460(n) = { my(u1=1,u2=3,old_u1); if(n<=2,sign(n),while(n>u2,old_u1=u1;u1=u2;u2=old_u1+u2);(u2==n)); }; \\ _Antti Karttunen_, Nov 22 2017
%o A102460 (Python)
%o A102460 from sympy.ntheory.primetest import is_square
%o A102460 def A102460(n): return int(is_square(m:=5*(n**2-4)) or is_square(m+40)) # _Chai Wah Wu_, Jun 13 2024
%Y A102460 Cf. A000032, A130241, A130242, A130247, A123927.
%Y A102460 Cf. partial sums A130245.
%Y A102460 Cf. also A010056, A104162, A105348, A147612, A294878.
%K A102460 nonn
%O A102460 0,1
%A A102460 _Casey Mongoven_, Apr 18 2005
%E A102460 Data section extended up to a(123) by _Antti Karttunen_, Nov 22 2017