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.

Showing 1-10 of 11 results. Next

A113188 Primes that are the difference of two Fibonacci numbers; primes in A007298.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 19, 29, 31, 47, 53, 89, 131, 139, 199, 233, 521, 607, 953, 1453, 1597, 2207, 2351, 2579, 3571, 6763, 9349, 10891, 28513, 28649, 28657, 42187, 44771, 46279, 75017, 189653, 317777, 514229, 1981891, 2177699, 3010349, 3206767
Offset: 1

Views

Author

T. D. Noe, Oct 17 2005

Keywords

Comments

The difference F(i)-F(j) equals the sum F(j-1)+...+F(i-2) [Corrected by Patrick Capelle, Mar 01 2008]. In general, we need gcd(i,j)=1 for F(i)-F(j) to be prime. The exceptions are handled by the following rule: if i and j are both even or both odd, then F(i)-F(j) is prime if either (1) i-j=4 and L(i-2) is a Lucas prime or (2) i-j=2 and F(i-1) is a Fibonacci prime.

Examples

			The prime 139 is here because it is F(12)-F(5).
		

Crossrefs

Cf. A000045 (Fibonacci numbers), A001605 (Fibonacci(n) is prime), A001606 (Lucas(n) is prime), A113189 (number of times that Fibonacci(n)-Fibonacci(i) is prime for i=0..n-3).

Programs

  • Mathematica
    lst={}; Do[p=Fibonacci[n]-Fibonacci[i]; If[PrimeQ[p], AppendTo[lst, p]], {n, 2, 40}, {i, n-1}]; Union[lst]
    Select[Union[Flatten[Differences/@Subsets[Fibonacci[Range[50]],{2}]]],PrimeQ] (* Harvey P. Dale, Aug 04 2024 *)
  • PARI
    list(lim)=my(v=List(),F=vector(A130233(lim),i,fibonacci(i)),s,t); for(i=1,#F, s=0; forstep(j=i,1,-1, s+=F[j]; if(s>lim, break); if(isprime(s), listput(v,s)))); Set(v) \\ Charles R Greathouse IV, Oct 07 2016

A219114 Integers n such that n^2 is the difference of two Fibonacci numbers.

Original entry on oeis.org

0, 1, 2, 4, 9, 12, 15, 24
Offset: 1

Views

Author

Max Alekseyev, Nov 12 2012

Keywords

Comments

Numbers n such that n^2 is in A007298.
No other terms below 10^10000. - Manfred Scheucher, Jun 12 2015

Examples

			The only known square differences of Fibonacci numbers are:
0^2 = F(2)-F(1) = F(k)-F(k) for any k,
1^2 = F(1)-F(0) = F(2)-F(0) = F(3)-F(1) = F(3)-F(2) = F(4)-F(3),
2^2 = F(5)-F(1) = F(5)-F(2),
4^2 = F(8)-F(5),
9^2 = F(11)-F(6),
12^2 = F(12)-F(0) = F(13)-F(11) = F(14)-F(13),
15^2 = F(13)-F(6),
24^2 = F(15)-F(9).
		

Crossrefs

Cf. A000045 (Fibonacci numbers).
Cf. A007298 (differences of Fibonacci numbers).

Programs

  • Mathematica
    t = Union[Flatten[Table[Fibonacci[n] - Fibonacci[i], {n, 100}, {i, n}]]]; t2 = Select[t, IntegerQ[Sqrt[#]] &]; Sqrt[t2] (* T. D. Noe, Feb 12 2013 *)

A050939 Numbers that are not the sum of consecutive Fibonacci numbers.

Original entry on oeis.org

9, 14, 15, 17, 22, 23, 24, 25, 27, 28, 30, 35, 36, 37, 38, 39, 40, 41, 43, 44, 45, 46, 48, 49, 51, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 69, 70, 71, 72, 73, 74, 75, 77, 78, 79, 80, 82, 83, 85, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101
Offset: 1

Views

Author

N. J. A. Sloane, Jan 02 2000

Keywords

Comments

From Clark Kimberling, Dec 16 2009: (Start)
(1) This is the ordered sequence of positive numbers that are not the difference between two Fibonacci numbers; see A007298 for a proof.
(2) Let s=(1,2,1,4,2,1,7,4,2,1,12,7,4,2,1,...) be the lengths of runs of consecutive numbers missing from A050939. Is s=A104582? (End)

Crossrefs

Programs

  • Mathematica
    (See A204924, which generates an ordered list of differences of Fibonacci numbers, as in A204922.)

A113191 Difference of two Lucas numbers.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 14, 15, 16, 17, 18, 22, 25, 26, 27, 28, 29, 36, 40, 43, 44, 45, 46, 47, 58, 65, 69, 72, 73, 74, 75, 76, 94, 105, 112, 116, 119, 120, 121, 122, 123, 152, 170, 181, 188, 192, 195, 196, 197, 198, 199, 246, 275, 293, 304
Offset: 1

Views

Author

T. D. Noe, Oct 17 2005

Keywords

Comments

Also the sum of consecutive Lucas numbers because the difference L(i) - L(j) equals the sum L(j+1) + ... + L(i+2).
Conjecture: L(m) - L(n) with m > 1 and m > n >= 0 is a perfect power but not a square only for (m,n) = (7,0), (5,2). This has been verified for n < m <= 500. Note that L(7) - L(0) = 29 - 2 = 3^3 and L(5) - L(2) = 11 - 3 = 2^3. - Zhi-Wei Sun, Jan 02 2025

Crossrefs

Cf. A000032 (Lucas numbers), A007298 (difference of two Fibonacci numbers).
Cf. A221471, A221472 (square root of squares in this sequence).

Programs

  • Mathematica
    Lucas[n_] := Fibonacci[n+1]+Fibonacci[n-1]; Union[Flatten[Table[Lucas[n]-Lucas[i], {n, 13}, {i, 0, n-2}]]]

A129713 Triangle read by rows: T(n,k) is the number of Fibonacci binary words of length n and starting with exactly k 1's (0<=k<=n). A Fibonacci binary word is a binary word having no 00 subword.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 2, 1, 1, 1, 5, 3, 2, 1, 1, 1, 8, 5, 3, 2, 1, 1, 1, 13, 8, 5, 3, 2, 1, 1, 1, 21, 13, 8, 5, 3, 2, 1, 1, 1, 34, 21, 13, 8, 5, 3, 2, 1, 1, 1, 55, 34, 21, 13, 8, 5, 3, 2, 1, 1, 1, 89, 55, 34, 21, 13, 8, 5, 3, 2, 1, 1, 1, 144, 89, 55, 34, 21, 13, 8, 5, 3, 2, 1, 1, 1, 233, 144
Offset: 0

Views

Author

Emeric Deutsch, May 12 2007

Keywords

Comments

Row sums are the Fibonacci numbers (A000045). Sum(k*T(n,k), 0<=k<=n) = F(n+3)-2 = A001911(n).

Examples

			T(6,2) = 3 because we have 110110, 110111, 110101.
Triangle starts:
1;
1,1;
1,1,1;
2,1,1,1;
3,2,1,1,1;
5,3,2,1,1,1;
8,5,3,2,1,1,1;
		

Crossrefs

Cf. A054123.
Cf. A007298. - Altug Alkan, May 03 2016

Programs

  • Haskell
    a129713 n k = a129713_tabl !! n !! k
    a129713_row n = a129713_tabl !! n
    a129713_tabl = [1] : [1, 1] : f [1] [1, 1] where
       f us vs = ws : f vs ws where
                 ws = zipWith (+) (init us ++ [0, 0, 0]) (vs ++ [1])
    -- Reinhard Zumkeller, May 26 2015
  • Maple
    with(combinat): T:=proc(n,k) if k<=n-2 then fibonacci(n-k) elif k=n-1 or k=n then 1 else 0 fi end: for n from 0 to 15 do seq(T(n,k),k=0..n) od; # yields sequence in triangular form
  • Mathematica
    nn=15;a=1/(1-y x);b=1/(1-x);Map[Select[#,#>0&]&,CoefficientList[Series[a (1+x)/(1-x^2b),{x,0,nn}],{x,y}]]//Grid (* Geoffrey Critzer, Dec 04 2013 *)

Formula

T(n,k) = F(n-k) if k<=n-2, T(n,n-1) = T(n,n) = 1, where F(j) are the Fibonacci numbers (F(0)=0, F(1)=1). G.f.: G(t,z) = (1-z^2)/[(1-z-z^2)(1-tz)].
a(n) = A007298(n+4) - A007298(n+3). - Altug Alkan, May 03 2016

A290748 Let F denote the two-way infinite sequence of Fibonacci numbers (for all positive or negative integers k, F(k+2)=F(k)+F(k+1) with F(0)=0, F(1)=1). Sequence lists positive numbers that are the difference between two terms of F.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 29, 31, 32, 33, 34, 35, 37, 42, 47, 50, 52, 53, 54, 55, 56, 57, 58, 60, 63, 68, 76, 81, 84, 86, 87, 88, 89, 90, 92, 97, 110, 123, 131, 136, 139, 141, 142, 143, 144, 145, 146
Offset: 1

Views

Author

N. J. A. Sloane, Aug 11 2017

Keywords

Examples

			9 is here because F(6) - F(-2) = 8 - (-1) = 9.
		

Crossrefs

Cf. A000045, A007298 (if we only use F(k) for k >= 0).
See A290749 for the complement.

Programs

  • Maple
    N:= 40: # to get all terms <= F(N) - F(N-1)
    P:= sort(convert({seq(combinat:-fibonacci(n),n=-N..N)},list)):
    sort(convert(select(`<=`,{seq(seq(P[i]-P[j],j=1..i-1),i=1..nops(P))},P[-1]-P[-2]),list)): # Robert Israel, Aug 11 2017
  • Mathematica
    Select[Union[Subtract @@@ Tuples[Fibonacci[Range[-30, 30]], 2]], 0 < # < 150 &] (* Giovanni Resta, Aug 11 2017 *)

Extensions

Corrected by R. J. Mathar, Aug 10 2017
More terms from Giovanni Resta, Aug 11 2017

A272632 Non-Fibonacci numbers that are both a sum and a difference of two Fibonacci numbers.

Original entry on oeis.org

4, 6, 7, 10, 11, 16, 18, 26, 29, 42, 47, 68, 76, 110, 123, 178, 199, 288, 322, 466, 521, 754, 843, 1220, 1364, 1974, 2207, 3194, 3571, 5168, 5778, 8362, 9349, 13530, 15127, 21892, 24476, 35422, 39603, 57314, 64079, 92736, 103682, 150050, 167761, 242786
Offset: 1

Views

Author

Altug Alkan, May 04 2016

Keywords

Comments

Intersection of A001690 and A007298 and A084176.
Sequence focuses on the non-Fibonacci numbers because of the fact that all Fibonacci numbers are both the sum of two Fibonacci numbers and the difference of two Fibonacci numbers by definition of Fibonacci numbers.
For relation with Lucas numbers, see formula section.

Examples

			6 is a term because 6 = Fibonacci(1) + Fibonacci(5) = Fibonacci(6) - Fibonacci(3).
16 is a term because 16 = Fibonacci(6) + Fibonacci(6) = Fibonacci(8) - Fibonacci(5).
167761 is a term because it is not a Fibonacci number and 167761 = Fibonacci(24) + Fibonacci(26) = 46368 + 121393 and Fibonacci(24) + Fibonacci(26) = Fibonacci(27) - Fibonacci(23) by definition.
		

Crossrefs

Programs

  • Mathematica
    mxf=30; {s,d} = Reap[Do[{a,b} = Fibonacci@{i,j}; Sow[a+b, 0]; Sow[a-b, 1], {i, mxf}, {j, i}]][[2]]; Complement[ Intersection[s, d], Fibonacci@ Range@ mxf] (* Giovanni Resta, May 04 2016 *)

Formula

a(2*n-1) = fibonacci(n+1) + fibonacci(n+3) =A000204(n+2) for n >= 1.
a(2*n) = 2*fibonacci(n+3) = A078642(n+1) for n >= 1.
G.f.: -x*(4+6*x+3*x^2+4*x^3)/(-1+x^2+x^4) . - R. J. Mathar, Jan 13 2023
a(n) = a(n-2) + a(n-4) for n > 4. - Christian Krause, Oct 31 2023

A272635 Numbers that are not a sum or a difference of two Fibonacci numbers.

Original entry on oeis.org

17, 25, 27, 28, 30, 38, 40, 41, 43, 44, 45, 46, 48, 49, 51, 59, 61, 62, 64, 65, 66, 67, 69, 70, 71, 72, 73, 74, 75, 77, 78, 79, 80, 82, 83, 85, 93, 95, 96, 98, 99, 100, 101, 103, 104, 105, 106, 107, 108, 109, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122
Offset: 1

Views

Author

Altug Alkan, May 04 2016

Keywords

Comments

This sequence is the complement of the union of A007298 and A084176.

Crossrefs

Programs

  • Maple
    N:= 30: # to get all terms < A000045(N+1) - A000045(N-4)
    fibs:= [seq(combinat:-fibonacci(i),i=1..N)]:
    R:= {seq(seq(fibs[i]-fibs[j],j=1..i-1),i=1..N), seq(seq(fibs[i]+fibs[j],j=1..i),i=1..N)}:
    A:= {$1..fibs[-1]+fibs[-2]-fibs[-5]-1} minus R:
    sort(convert(A,list)); # Robert Israel, May 04 2016

A272631 Sum of three or more consecutive Fibonacci numbers.

Original entry on oeis.org

2, 4, 6, 7, 10, 11, 12, 16, 18, 19, 20, 26, 29, 31, 32, 33, 42, 47, 50, 52, 53, 54, 68, 76, 81, 84, 86, 87, 88, 110, 123, 131, 136, 139, 141, 142, 143, 178, 199, 212, 220, 225, 228, 230, 231, 232, 288, 322, 343, 356, 364, 369, 372, 374, 375, 376, 466, 521, 555, 576
Offset: 1

Views

Author

Altug Alkan, May 04 2016

Keywords

Comments

Except the first term that is 2, this sequence lists non-Fibonacci numbers (A001690) that are the difference of two Fibonacci numbers. So 2 is the only Fibonacci number in this sequence.
Since the sum of two consecutive Fibonacci numbers is obviously a Fibonacci number because of the definition of Fibonacci numbers, this sequence focuses on the sum of three or more consecutive Fibonacci numbers.

Examples

			4 is a term because Fibonacci(1) + Fibonacci(2) + Fibonacci(3) = 1 + 1 + 2 = 4.
		

Crossrefs

Programs

  • Mathematica
    mx=10^4; i=1; Union@ Reap[ While[(s = Plus @@ Fibonacci[i + {0,1,2}]) <= mx, j = ++i + 1; While[s <= mx, Sow@s; s += Fibonacci@ ++j]]][[2, 1]] (* Giovanni Resta, May 04 2016 *)

A272712 Perfect powers that are the difference of two nonnegative Fibonacci numbers.

Original entry on oeis.org

1, 4, 8, 16, 32, 81, 144, 225, 343, 576
Offset: 1

Views

Author

Altug Alkan, May 05 2016

Keywords

Comments

Listed 10 terms are 1, 2^2, 2^3, 2^4, 2^5, 3^4, 12^2, 15^2, 3^5, 24^2.
1, 4, 8, 16, 32, 81, 343 are also members of A000961.
1, 4, 8, 16, 144 are in the intersection of this sequence and A272575.
Is this sequence finite?
If a(11) exists, it must be larger than 10^2000. - Giovanni Resta, May 25 2016

Examples

			32 is a term because 32 = 2^5 = 34 - 2 = Fibonacci(9) - Fibonacci(3).
		

Crossrefs

Programs

  • Maple
    isA272712 := proc(n)
        isA001597(n) and isA007298(n) ; #uses code in A001597 and A007298
    end proc:
    for n from 1 do
        if isA272712(n) then
            printf("%d\n",n) ;
        end if;
    end do: # R. J. Mathar, May 25 2016
  • Mathematica
    isA001597[n_] := n == 1 || GCD @@ FactorInteger[n][[All, 2]] > 1;
    isA007298[n_] := Module[{i, Fi, j, Fj}, For[i = 0, True, i++, Fi = Fibonacci[i]; For[j = i, True, j++, Fj = Fibonacci[j]; Which[Fj - Fi == n, Return@True, Fj - Fi > n, Break[]]]; Fj := Fibonacci[i + 1]; If[Fj - Fi > n, Return@False]]];
    Select[Range[1000], isA001597[#] && isA007298[#]&] (* Jean-François Alcover, Nov 16 2023, after R. J. Mathar in A007298 *)
Showing 1-10 of 11 results. Next