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.

User: Axel Harvey

Axel Harvey's wiki page.

Axel Harvey has authored 21 sequences. Here are the ten most recent ones:

A129228 a(n) is that prime number p less than n*Pi such that n*Pi/p has the largest fractional part.

Original entry on oeis.org

2, 5, 5, 7, 2, 5, 11, 13, 17, 11, 7, 19, 7, 11, 17, 17, 11, 19, 5, 7, 11, 7, 37, 19, 41, 41, 17, 11, 23, 19, 7, 17, 13, 37, 11, 19, 59, 61, 41, 7, 43, 11, 17, 71, 71, 29, 37, 19, 11, 79, 23, 41, 43, 17, 29, 11, 61, 61, 31, 97, 97, 13, 11, 101, 103, 13, 53, 107, 31, 11, 113, 19, 23
Offset: 1

Author

Axel Harvey, Apr 04 2007

Keywords

Examples

			a(14)=11 because 14*Pi/11 = 3.998... and the fractional part 0.998... represents the greatest remainder resulting from the division of 14*Pi by a prime number less than 14*Pi.
		

Crossrefs

Cf. A129227.

Programs

  • Mathematica
    f[n_] := Denominator[ Max[ FractionalPart[(n*Pi / Prime@ Range@ PrimePi@ Floor[n*Pi - 1])]] [[2]]]; Array[f, 73] (* Robert G. Wilson v, Apr 08 2007 *)

Extensions

Edited and extended by Robert G. Wilson v, Apr 08 2007

A129227 a(n) is that prime number, p, less than n*Pi such that n*Pi/p has the smallest fractional part.

Original entry on oeis.org

3, 3, 3, 11, 5, 17, 7, 5, 7, 31, 17, 37, 37, 43, 47, 5, 53, 53, 59, 31, 13, 23, 71, 73, 13, 79, 83, 29, 13, 47, 97, 97, 103, 53, 109, 113, 29, 17, 61, 31, 127, 131, 67, 137, 47, 71, 73, 149, 151, 157, 157, 163, 83, 167, 43, 173, 179, 181, 37, 47, 191, 97, 197, 67, 17, 103
Offset: 1

Author

Axel Harvey, Apr 04 2007

Keywords

Examples

			a(4)=11 because 4*Pi/11 = 1.142... and the fractional part 0.142... represents the smallest remainder resulting from the division of 4*Pi by a prime number less than 4*Pi.
		

Crossrefs

Cf. A129228.

Programs

  • Mathematica
    f[n_] := (p = Denominator[ Min[ FractionalPart[(n*Pi / Prime@ Range@ PrimePi[n*Pi])]] [[2]]]; If[p == 1, n, p]); Array[f, 66] (* Robert G. Wilson v, Apr 08 2007 *)
  • Sage
    A129227 = lambda n: sorted(primes(floor(n*pi)+1), key=lambda p: (n*pi/p-floor(n*pi/p)))[0] # D. S. McNeil, Dec 11 2010

Extensions

Edited and extended by Robert G. Wilson v, Apr 08 2007

A128533 a(n) = F(n)*L(n+2) where F=Fibonacci and L=Lucas numbers.

Original entry on oeis.org

0, 4, 7, 22, 54, 145, 376, 988, 2583, 6766, 17710, 46369, 121392, 317812, 832039, 2178310, 5702886, 14930353, 39088168, 102334156, 267914295, 701408734, 1836311902, 4807526977, 12586269024, 32951280100, 86267571271, 225851433718, 591286729878
Offset: 0

Author

Axel Harvey, Mar 08 2007

Keywords

Comments

Generally, F(n)*L(n+k) = F(2*n + k) + F(k)*(-1)^(n+1): if k = 0 then sequence is A001906, if k = 1 it is A081714.

Examples

			a(4) = 54 because F(4)*L(6) = 3*18.
G.f. = 4*x + 7*x^2 + 22*x^3 + 54*x^4 + 145*x^5 + 376*x^6 + 988*x^7 + ...
		

Crossrefs

Programs

  • GAP
    List([0..30], n -> Fibonacci(2*(n+1)) + (-1)^(n+1)); # G. C. Greubel, Jan 07 2019
  • Magma
    [Fibonacci(n)*Lucas(n+2): n in [0..30]]; // Vincenzo Librandi, Feb 20 2013
    
  • Maple
    with(combinat); A128533:=n->fibonacci(2*n+2)+(-1)^(n+1); seq(A128533(k),k=0..50); # Wesley Ivan Hurt, Oct 19 2013
  • Mathematica
    LinearRecurrence[{2,2,-1}, {0,4,7}, 40] (* Vincenzo Librandi, Feb 20 2013 *)
    a[n_]:= Fibonacci[2n+2] -(-1)^n; (* Michael Somos, May 26 2014 *)
  • PARI
    vector(30, n, n--; fibonacci(2*(n+1)) + (-1)^(n+1)) \\ G. C. Greubel, Jan 07 2019
    
  • Sage
    [fibonacci(2*(n+1)) + (-1)^(n+1) for n in (0..30)] # G. C. Greubel, Jan 07 2019
    

Formula

a(n) = F(2*(n+1)) + (-1)^(n+1), assuming F(0) = 0 and L(0) = 2.
From R. J. Mathar, Apr 16 2009: (Start)
a(n) = 2*a(n-1) + 2*a(n-2) - a(n-3).
G.f.: x*(4-x)/((1+x)*(x^2-3*x+1)). (End)
a(n) = A186679(2*n). - Reinhard Zumkeller, Feb 25 2011
a(-n) = - A128535(n). - Michael Somos, May 26 2014
0 = a(n)*(+4*a(n) + a(n+1) - 17*a(n+2)) + a(n+1)*(-14*a(n+1) + a(n+2)) + a(n+2)*(+4*a(n+2)) for all n in Z. - Michael Somos, May 26 2014

Extensions

More terms from Vincenzo Librandi, Feb 20 2013

A128534 a(n) = Fibonacci(n)*Lucas(n-1).

Original entry on oeis.org

0, 2, 1, 6, 12, 35, 88, 234, 609, 1598, 4180, 10947, 28656, 75026, 196417, 514230, 1346268, 3524579, 9227464, 24157818, 63245985, 165580142, 433494436, 1134903171, 2971215072, 7778742050, 20365011073, 53316291174, 139583862444, 365435296163, 956722026040, 2504730781962
Offset: 0

Author

Axel Harvey, Mar 08 2007

Keywords

Comments

Generally, F(n)*L(n+k) = F(2*n + k) + F(k)*(-1)^(n+1). If k=0 the sequence is A001906; if k=1 it is A081714.
a(n) is the maximum area of a quadrilateral with lengths of sides in order F(n), F(n), L(n-1), L(n-1) for n>1. - J. M. Bergot, Jan 28 2016
Can be obtained (up to signs) by setting x = F(n)/F(n+1) in g.f. for Lucas numbers - see Pongsriiam. - N. J. A. Sloane, Mar 23 2017

Examples

			a(5) = 35 because F(5)*L(4) = 5*7.
		

Programs

  • Magma
    [Fibonacci(n)*Lucas(n-1): n in [0..30]]; // G. C. Greubel, Dec 21 2017
  • Maple
    seq(combinat:-fibonacci(2*n-1)+(-1)^(n+1),n=0..50); # Robert Israel, Jan 28 2016
  • Mathematica
    Table[Fibonacci[n] LucasL[n - 1], {n, 0, 31}] (* Michael De Vlieger, Jan 29 2016 *)
  • PARI
    concat( 0, Vec(-x*(-2+3*x)/((1+x)*(x^2-3*x+1)) + O(x^40))) \\ Michel Marcus, Jan 28 2016
    

Formula

a(n) = F(2*n - 1) + (-1)^(n+1), assuming F(0)=0 and L(0)=2.
From R. J. Mathar, Apr 16 2009: (Start)
a(n) = 2*a(n-1) + 2*a(n-2) - a(n-3).
G.f.: x*(2-3*x)/((1+x)*(x^2-3*x+1)). (End)
a(n) = (2^(-1-n)*(-5*(-1)^n*2^(1+n) - (-5+sqrt(5))*(3+sqrt(5))^n + (3-sqrt(5))^n*(5+sqrt(5))))/5. - Colin Barker, Apr 05 2016
a(n+1) = A081714(n) + 2*(-1)^n. - A.H.M. Smeets, Feb 26 2022

Extensions

More terms from Michel Marcus, Jan 28 2016

A128535 a(n) = F(n)*L(n-2) where F = Fibonacci and L = Lucas numbers.

Original entry on oeis.org

0, -1, 2, 2, 9, 20, 56, 143, 378, 986, 2585, 6764, 17712, 46367, 121394, 317810, 832041, 2178308, 5702888, 14930351, 39088170, 102334154, 267914297, 701408732, 1836311904, 4807526975, 12586269026, 32951280098, 86267571273, 225851433716, 591286729880
Offset: 0

Author

Axel Harvey, Mar 09 2007

Keywords

Comments

Generally, F(n)*L(n+k) = F(2*n + k) + F(k)*(-1)^(n+1):
if k=0 the sequence is A001906, if k=1 it is A081714.
For n>2, a(n) is twice the area of the triangle with vertices at (F(n-3), F(n-2)), (F(n-1), F(n)), and (L(n), L(n-1)), where F(n)=A000045(n) and L(n)=A000032(n). - J. M. Bergot, May 22 2014
a(n) is the maximum area of a quadrilateral with lengths of sides in order L(n-2), L(n-2), F(n), F(n) for n>2. - J. M. Bergot, Jan 28 2016

Examples

			a(7) = 143 because F(7)*L(5) = 13*11.
G.f. = -x + 2*x^2 + 2*x^3 + 9*x^4 + 20*x^5 + 56*x^6 + 143*x^7 + ...
		

References

  • Mohammad K. Azarian, Identities Involving Lucas or Fibonacci and Lucas Numbers as Binomial Sums, International Journal of Contemporary Mathematical Sciences, Vol. 7, No. 45, 2012, pp. 2221-2227.

Crossrefs

Programs

  • Magma
    [Fibonacci(n)*Lucas(n-2): n in [0..30]]; // Vincenzo Librandi, Feb 20 2013
    
  • Maple
    a:= n-> (<<0|1|0>, <0|0|1>, <-1|2|2>>^n. <<0,-1,2>>)[1, 1]:
    seq(a(n), n=0..30);  # Alois P. Heinz, Sep 28 2016
  • Mathematica
    Table[Fibonacci[i]LucasL[i-2], {i,0,30}] (* Harvey P. Dale, Feb 16 2011 *)
    LinearRecurrence[{2, 2, -1}, {0, -1, 2}, 40] (* Vincenzo Librandi, Feb 20 2013 *)
    a[ n_] := Fibonacci[2 n - 2] + (-1)^n; (* Michael Somos, May 26 2014 *)
  • PARI
    a(n)=([0,1,0; 0,0,1; -1,2,2]^n*[0;-1;2])[1,1] \\ Charles R Greathouse IV, Feb 01 2016
    
  • PARI
    a(n) = round(((-1)^n+(2^(-1-n)*(-(3-sqrt(5))^n*(3+sqrt(5))-(-3+sqrt(5))*(3+sqrt(5))^n))/sqrt(5))) \\ Colin Barker, Sep 28 2016

Formula

a(n) = F(2*(n-1)) - (-1)^(n+1), assuming F(0)=0 and L(0)=2.
From R. J. Mathar, Apr 16 2009: (Start)
a(n) = 2*a(n-1) + 2*a(n-2) - a(n-3).
G.f.: x*(-1+4*x)/((1+x)*(x^2-3*x+1)). (End)
a(n+1) = - A116697(2*n). - Reinhard Zumkeller, Feb 25 2011
a(-n) = - A128533(n). - Michael Somos, May 26 2014
0 = a(n)*(+4*a(n) + a(n+1) - 17*a(n+2)) + a(n+1)*(-14*a(n+1) + a(n+2)) + a(n+2)*(+4*a(n+2)) for all n in Z. - Michael Somos, May 26 2014
a(n) = ((-1)^n+(2^(-1-n)*(-(3-sqrt(5))^n*(3+sqrt(5))-(-3+sqrt(5))*(3+sqrt(5))^n)) / sqrt(5)). - Colin Barker, Sep 28 2016

Extensions

More terms from Harvey P. Dale, Feb 16 2011

A125571 Least prime factor of Sum_{k=0..n-1} n^k.

Original entry on oeis.org

3, 13, 5, 11, 7, 29, 3, 7, 11, 15797, 5, 53, 3, 11, 17, 10949, 7, 109912203092239643840221, 3, 43, 23, 461, 5, 11, 3, 109, 5, 59, 7, 568972471024107865287021434301977158534824481, 3, 67, 5, 31, 13, 149, 3, 7, 11, 83, 13, 173, 3, 19, 47
Offset: 2

Author

Axel Harvey, Jan 02 2007

Keywords

Comments

The sequence of largest prime factors of numbers generated by the same sum is probably identical to sequence A006486, since (n^n - 1)/(1 + n^2 + ... + n^(n-1)) = n-1.

Examples

			The sum 1 + 4 + 4^2 + 4^3 = 85 = 5 * 17 so the third term is 5.
		

Crossrefs

Cf. A006486.
Least prime factors of A023037.

Programs

  • Mathematica
    Table[FactorInteger[Sum[n^k,{k,0,n-1}]][[1,1]],{n,2,46}] (* James C. McMahon, Dec 18 2024 *)
  • PARI
    a(n) = factor(sum(k=0, n-1, n^k))[1, 1]; \\ Michel Marcus, Aug 20 2013

Extensions

More terms from Michel Marcus, Aug 20 2013

A119382 Indices j of prime numbers p(j) such that (p(j-1) + p(j+2)) / p(j) = 2.

Original entry on oeis.org

12, 19, 59, 92, 112, 115, 140, 211, 233, 253, 261, 268, 276, 285, 291, 294, 301, 322, 352, 358, 369, 389, 407, 417, 473, 500, 542, 598, 612, 624, 714, 718, 723, 742, 819, 933, 939, 994, 998, 1016, 1098, 1119, 1263, 1299, 1312, 1400, 1414, 1418, 1422, 1449
Offset: 1

Author

Axel Harvey, Jul 25 2006

Keywords

Examples

			a(1)=12 because the 11th prime 31 plus the 14th prime 43 divided by the 12th prime 37 equals 2.
		

Programs

Extensions

More terms from Stefan Steinerberger, Jul 26 2006

A119380 Remainder when the integer part of e^n is divided by the n-th prime number.

Original entry on oeis.org

0, 1, 0, 5, 5, 0, 8, 16, 7, 15, 13, 28, 23, 23, 26, 24, 57, 57, 62, 43, 70, 49, 36, 64, 84, 3, 4, 64, 83, 103, 45, 53, 49, 37, 26, 19, 75, 20, 147, 20, 134, 73, 56, 17, 31, 89, 143, 200, 103, 170, 25, 37, 159, 181, 90, 242, 16, 93, 222, 163, 57, 132, 214, 71, 164, 57, 62, 14
Offset: 1

Author

Axel Harvey, Jul 24 2006

Keywords

Examples

			The sixth term is 0 because e^6 is 403.42879... and 403 is a multiple of 13, the sixth prime.
		

Crossrefs

Cf. A000149.

Programs

Formula

a(n) = floor(e^n) mod prime(n).

Extensions

More terms from Stefan Steinerberger, Jul 26 2006

A121205 "666" in bases 7 and higher rewritten in base 10.

Original entry on oeis.org

342, 438, 546, 666, 798, 942, 1098, 1266, 1446, 1638, 1842, 2058, 2286, 2526, 2778, 3042, 3318, 3606, 3906, 4218, 4542, 4878, 5226, 5586, 5958, 6342, 6738, 7146, 7566, 7998, 8442, 8898, 9366, 9846, 10338, 10842, 11358, 11886, 12426
Offset: 7

Author

Axel Harvey, Aug 19 2006

Keywords

Examples

			In octal notation "666" means 6*8*8 + 6*8 + 6 = 438.
		

Programs

  • Mathematica
    Table[FromDigits[{6,6,6},n],{n,7,50}] (* or *) LinearRecurrence[{3,-3,1},{342,438,546},40] (* Harvey P. Dale, Apr 15 2018 *)
  • PARI
    a(n) = 6*(n^2 + n + 1); \\ Michel Marcus, Aug 20 2013

Formula

a(n) = 6*(n^2 + n + 1) = a(n-1) + 12*n.

Extensions

More terms from Michel Marcus, Aug 20 2013

A120941 a(n)=k-n where prime(k) is the smallest prime greater than prime(n)*prime(n+1).

Original entry on oeis.org

3, 5, 9, 18, 30, 42, 60, 77, 113, 145, 179, 229, 262, 293, 353, 430, 487, 545, 622, 671, 737, 826, 916, 1052, 1184, 1249, 1310, 1373, 1443, 1654, 1894, 2026, 2131, 2298, 2481, 2602, 2782, 2943, 3107, 3298, 3436, 3651, 3866, 3975, 4083, 4346, 4808, 5144
Offset: 1

Author

Axel Harvey, Aug 18 2006

Keywords

Comments

Parity of A120941: 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, ....

Examples

			The product of the 4th prime number, 7 and the 5th prime, 11, is 77; the smallest prime greater than this is the 22nd prime, 79; therefore the 4th term of the sequence is 22-4 = 18.
		

Crossrefs

Programs

  • Maple
    f:= n -> numtheory:-pi(ithprime(n)*ithprime(n+1))+1-n:
    map(f, [$1..100]); # Robert Israel, Mar 21 2017
  • Mathematica
    Table[PrimePi[Prime[n]Prime[n + 1]] - n + 1, {n, 48}] (* Zak Seidov, Aug 21 2006 *)
  • PARI
    for(n=1, 100, print1(primepi(prime(n)*prime(n + 1)) - n + 1, ", ")) \\ Indranil Ghosh, Mar 22 2017
    
  • Python
    from sympy import prime, primepi
    print([primepi(prime(n)*prime(n + 1)) - n + 1 for n in range(1, 100)]) # Indranil Ghosh, Mar 22 2017

Formula

a(n) = A000720(A006094(n)) + 1 - n. - Robert Israel, Mar 21 2017

Extensions

More terms from Robert G. Wilson v, Aug 21 2006