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 17 results. Next

A104622 Indices of prime values of heptanacci-Lucas numbers A104621.

Original entry on oeis.org

0, 2, 3, 5, 7, 10, 17, 24, 25, 26, 28, 38, 40, 49, 62, 79, 89, 114, 140, 145, 182, 248, 353, 437, 654, 702, 784, 921, 931, 986, 1206, 2136, 2137, 3351, 5411, 13264, 13757, 16348, 27087, 27160
Offset: 1

Views

Author

Jonathan Vos Post, Mar 17 2005

Keywords

Comments

The 7th-order linear recurrence A104622 (heptanacci-Lucas numbers) is a generalization of the Lucas sequence A000032. T. D. Noe and I have noted that the heptanacci-Lucas numbers have many more primes than the corresponding heptanacci (see A104414) which he found has only the first 3 primes that I identified through the first 5000 values, whereas these heptanacci-Lucas numbers have 17 primes among the first 100 values. For semiprimes in heptanacci-Lucas numbers, see A104623.

Examples

			A104621(0) = 7,
A104621(2) = 3,
A104621(3) = 7,
A104621(5) = 31,
A104621(7) = 127,
A104621(10) = 983,
A104621(17) = 122401,
A104621(24) = 15231991.
		

Crossrefs

Programs

  • Mathematica
    a[0] = 7; a[1] = 1; a[2] = 3; a[3] = 7; a[4] = 15; a[5] = 31; a[6] = 63; a[n_] := a[n] = a[n - 1] + a[n - 2] + a[n - 3] + a[n - 4] + a[n - 5] + a[n - 6] + a[n - 7]; Do[ If[ PrimeQ[ a[n]], Print[n]], {n, 5000}] (* Robert G. Wilson v, Mar 17 2005 *)
    Flatten[Position[LinearRecurrence[{1,1,1,1,1,1,1},{7,1,3,7,15,31,63},28000],?PrimeQ]]-1 (* _Harvey P. Dale, Jan 02 2016 *)

Formula

Prime values of the heptanacci-Lucas numbers, which are defined by: a(0) = 7, a(1) = 1, a(2) = 3, a(3) = 7, a(4) = 15, a(5) = 31, a(6) = 63, for n > 6: a(n) = a(n-1)+a(n-2)+a(n-3)+a(n-4)+a(n-5)+a(n-6)+a(n-7).

Extensions

More terms from T. D. Noe and Robert G. Wilson v, Mar 17 2005

A104623 Indices of semiprime (A001358) values of Heptanacci-Lucas numbers A104621.

Original entry on oeis.org

4, 8, 9, 11, 12, 14, 15, 16, 22, 23, 32, 34, 37, 41, 42, 50, 52, 57, 58, 66, 69, 76, 77, 81, 90, 120, 139
Offset: 0

Views

Author

Jonathan Vos Post, Mar 17 2005

Keywords

Comments

The 7th-order linear recurrence A104622 (heptanacci-Lucas numbers) is a generalization of the Lucas sequence A000032. T. D. Noe and I have noted that the heptanacci-Lucas numbers have many more primes than the corresponding heptanacci (see A104414) which he found has only the first 3 primes that I identified through the first 5000 values, whereas these heptanacci-Lucas numbers have 17 primes among the first 100 values. For primes in Heptanacci-Lucas numbers, see A104622.

Examples

			A104621(4) = 15 = 3 * 5,
A104621(8) = 247 = 13 * 19,
A104621(9) = 493 = 17 * 29,
A104621(11) = 1959 = 3 * 653,
A104621(12) = 3903 = 3 * 1301,
A104621(14) = 15487 = 17 * 911,
		

Crossrefs

Cf. A001358.

A105768 Prime Lucas 7-step numbers, A104621.

Original entry on oeis.org

3, 7, 31, 127, 983, 122401, 15231991, 30341581, 60439343, 239818559, 235883775871, 935968272887, 462162688688737, 3592979567873032703, 439785318101603999198591, 432569613524779275706080077
Offset: 1

Views

Author

T. D. Noe, Apr 22 2005

Keywords

Crossrefs

Cf. A104622 (indices of prime Lucas 7-step numbers).

Programs

  • Mathematica
    a={-1, -1, -1, -1, -1, -1, 7}; lst={}; Do[s=Plus@@a; a=RotateLeft[a]; a[[ -1]]=s; If[PrimeQ[s], AppendTo[lst, s]], {n, 1000}]; lst

A105935 Indices of Lucas 7-step numbers A104621 which have a nontrivial divisor in common with index.

Original entry on oeis.org

6, 12, 18, 20, 21, 33, 36, 42, 54, 57, 60, 65, 87, 93, 99, 100, 104, 105, 108, 111, 141, 147, 152, 153, 155, 156, 162, 165, 171, 177, 180, 189, 192, 195, 210, 215, 220, 222, 230, 235, 238, 240, 249, 255, 261, 264, 273, 276, 279, 280, 286, 294, 295, 297, 300
Offset: 1

Views

Author

Jonathan Vos Post, Apr 26 2005

Keywords

Comments

Wanted: closed-form formula for this as exists for Fibonacci and Lucas numbers. Lucas 7-step numbers also known as heptanacci-Lucas numbers. The prime Lucas 7-step numbers are A105768, their indices being A104622.

Examples

			gcd(a(n), A104621(6,12,18,33,36,57,60,87,93,108)) = 3,
gcd(a(n), A104621(20,65,100,105)) = 5,
gcd(a(n), A104621(21,42)) = 7,
gcd(a(n), A104621(54,99)) = 9,
gcd(a(n), A104621(104)) = 13.
		

Crossrefs

Programs

  • Mathematica
    m=300; s = LinearRecurrence[{1, 1, 1, 1, 1, 1, 1}, {7, 1, 3, 7, 15, 31, 63}, m+1]; Select[Range[m], !CoprimeQ[#, s[[#+1]]] &] (* Amiram Eldar, Sep 05 2019 *)

Formula

gcd(a(n), A104621(a(n))) > 1.

Extensions

Offset corrected and a(5)-a(6) and more terms added by Amiram Eldar, Sep 05 2019

A105754 Lucas 8-step numbers.

Original entry on oeis.org

1, 3, 7, 15, 31, 63, 127, 255, 502, 1003, 2003, 3999, 7983, 15935, 31807, 63487, 126719, 252936, 504869, 1007735, 2011471, 4014959, 8013983, 15996159, 31928831, 63730943, 127208950, 253913031, 506818327, 1011625183, 2019235407
Offset: 1

Views

Author

T. D. Noe, Apr 22 2005

Keywords

Crossrefs

Cf. A000032, A001644, A073817, A074048, A074584, A104621, A105755 (Lucas n-step numbers).

Programs

  • Mathematica
    a={-1, -1, -1, -1, -1, -1, -1, 8}; Table[s=Plus@@a; a=RotateLeft[a]; a[[ -1]]=s, {n, 50}]
    CoefficientList[Series[-x*(1 + 2*x + 3*x^2 + 4*x^3 + 5*x^4 + 6*x^5 + 7*x^6 + 8*x^7 + 9*x^8)/(-1 + x + x^2 + x^3 + x^4 + x^5 + x^6 + x^7 + x^8 + x^9), {x, 0, 50}], x] (* G. C. Greubel, Dec 18 2017 *)
  • PARI
    a(n)=([0,1,0,0,0,0,0,0; 0,0,1,0,0,0,0,0; 0,0,0,1,0,0,0,0; 0,0,0,0,1,0,0,0; 0,0,0,0,0,1,0,0; 0,0,0,0,0,0,1,0; 0,0,0,0,0,0,0,1; 1,1,1,1,1,1,1,1]^(n-1)*[1;3;7;15;31;63;127;255])[1,1] \\ Charles R Greathouse IV, Jun 14 2015
    
  • PARI
    x='x+O('x^30); Vec(-x*(1 + 2*x + 3*x^2 + 4*x^3 + 5*x^4 + 6*x^5 + 7*x^6 + 8*x^7 + 9*x^8)/(-1 + x + x^2 + x^3 + x^4 + x^5 + x^6 + x^7 + x^8 + x^9)) \\ G. C. Greubel, Dec 18 2017

Formula

a(n) = Sum_{k=1..8} a(n-k) for n > 0, a(0)=8, a(n)=-1 for n=-7..-1.
G.f.: -x*(1 + 2*x + 3*x^2 + 4*x^3 + 5*x^4 + 6*x^5 + 7*x^6 + 8*x^7)/( -1 + x + x^2 + x^3 + x^4 + x^5 + x^6 + x^7 + x^8 ). - R. J. Mathar, Jun 20 2011

A105755 Lucas 9-step numbers.

Original entry on oeis.org

1, 3, 7, 15, 31, 63, 127, 255, 511, 1013, 2025, 4047, 8087, 16159, 32287, 64511, 128895, 257535, 514559, 1028105, 2054185, 4104323, 8200559, 16384959, 32737631, 65410751, 130692607, 261127679, 521740799, 1042453493, 2082852801
Offset: 1

Views

Author

T. D. Noe, Apr 22 2005

Keywords

Crossrefs

Cf. A000032, A001644, A073817, A074048, A074584, A104621, A105754 (Lucas n-step numbers).

Programs

  • Mathematica
    a={-1, -1, -1, -1, -1, -1, -1, -1, 9}; Table[s=Plus@@a; a=RotateLeft[a]; a[[ -1]]=s, {n, 50}]
  • Maxima
    a(n):=n*sum(sum((-1)^i*binomial(k,k-i)*binomial(n-9*i-1,k-1),i,0,(n-k)/9)/k,k,1,n);
    makelist(a(n),n,1,17); /* Vladimir Kruchinin, Aug 10 2011 */
    
  • PARI
    a(n)=([0,1,0,0,0,0,0,0,0; 0,0,1,0,0,0,0,0,0; 0,0,0,1,0,0,0,0,0; 0,0,0,0,1,0,0,0,0; 0,0,0,0,0,1,0,0,0; 0,0,0,0,0,0,1,0,0; 0,0,0,0,0,0,0,1,0; 0,0,0,0,0,0,0,0,1; 1,1,1,1,1,1,1,1,1]^(n-1)*[1;3;7;15;31;63;127;255;511])[1,1] \\ Charles R Greathouse IV, Jun 15 2015

Formula

a(n) = Sum_{k=1..9} a(n-k) for n > 0, a(0)=9, a(n)=-1 for n=-8..-1
G.f.: -x*(1 + 2*x + 3*x^2 + 4*x^3 + 5*x^4 + 6*x^5 + 7*x^6 + 8*x^7 + 9*x^8) / ( -1 + x + x^2 + x^3 + x^4 + x^5 + x^6 + x^7 + x^8 + x^9 ). - R. J. Mathar, Jun 20 2011
a(n) = n*Sum_{k=1..n} (Sum_{i=0..floor((n-k)/9)} (-1)^i*binomial(k, k-i)*binomial(n-9*i-1, k-1))/k. - Vladimir Kruchinin, Aug 10 2011

A106273 Discriminant of the polynomial x^n - x^(n-1) - ... - x - 1.

Original entry on oeis.org

1, 5, -44, -563, 9584, 205937, -5390272, -167398247, 6042477824, 249317139869, -11597205023744, -601139006326619, 34383289858207744, 2151954708695291177, -146323302326154543104, -10742330662077208945103, 846940331265064719417344, 71373256668946058057974997
Offset: 1

Views

Author

T. D. Noe, May 02 2005

Keywords

Comments

This polynomial is the characteristic polynomial of the Fibonacci and Lucas n-step sequences. These discriminants are prime for n=2, 4, 6, 26, 158 (A106274). It appears that the term a(2n+1) always has a factor of 2^(2n). With that factor removed, the discriminants are prime for odd n=3, 5, 7, 21, 99, 405. See A106275 for the combined list.
a(n) is the determinant of an r X r Hankel matrix whose entries are w(i+j) where w(n) = x1^n + x2^n + ... + xr^n where x1,x2,...xr are the roots of the titular characteristic polynomial. E.g., A000032 for n=2, A001644 for n=3, A073817 for n=4, A074048 for n=5, A074584 for n=6, A104621 for n=7, ... - Kai Wang, Jan 17 2021
Luca proves that a(n) is a term of the corresponding k-nacci sequence only for n=2 and 3. - Michel Marcus, Apr 12 2025

Crossrefs

Cf. A086797 (discriminant of the polynomial x^n-x-1), A000045, A000073, A000078, A001591, A001592 (Fibonacci n-step sequences), A000032, A001644, A073817, A074048, A074584, A104621, A105754, A105755 (Lucas n-step sequences), A086937, A106276, A106277, A106278 (number of distinct zeros of these polynomials for n=2, 3, 4, 5).

Programs

  • Mathematica
    Discriminant[p_?PolynomialQ, x_] := With[{n=Exponent[p, x]}, Cancel[((-1)^(n(n-1)/2) Resultant[p, D[p, x], x])/Coefficient[p, x, n]^(2n-1)]]; Table[Discriminant[x^n-Sum[x^i, {i, 0, n-1}], x], {n, 20}]
  • PARI
    {a(n)=(-1)^(n*(n+1)/2)*((n+1)^(n+1)-2*(2*n)^n)/(n-1)^2}  \\ Max Alekseyev, May 05 2005
    
  • PARI
    a(n)=poldisc('x^n-sum(k=0,n-1,'x^k)); \\ Joerg Arndt, May 04 2013

Formula

a(n) = (-1)^(n*(n+1)/2) * ((n+1)^(n+1)-2*(2*n)^n)/(n-1)^2. - Max Alekseyev, May 05 2005

A125127 Array L(k,n) read by antidiagonals: k-step Lucas numbers.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 3, 4, 1, 1, 3, 7, 7, 1, 1, 3, 7, 11, 11, 1, 1, 3, 7, 15, 21, 18, 1, 1, 3, 7, 15, 26, 39, 29, 1, 1, 3, 7, 15, 31, 51, 71, 47, 1, 1, 3, 7, 15, 31, 57, 99, 131, 76, 1, 1, 3, 7, 15, 31, 63, 113, 191, 241, 123, 1
Offset: 1

Views

Author

Jonathan Vos Post, Nov 21 2006

Keywords

Examples

			Table begins:
1 | 1  1  1   1   1   1    1    1    1    1
2 | 1  3  4   7  11  18   29   47   76  123
3 | 1  3  7  11  21  39   71  131  241  443
4 | 1  3  7  15  26  51   99  191  367  708
5 | 1  3  7  15  31  57  113  223  439  863
6 | 1  3  7  15  31  63  120  239  475  943
7 | 1  3  7  15  31  63  127  247  493  983
8 | 1  3  7  15  31  63  127  255  502 1003
9 | 1  3  7  15  31  63  127  255  511 1013
		

Crossrefs

n-step Lucas number analog of A092921 Array F(k, n) read by antidiagonals: k-generalized Fibonacci numbers (and see related A048887, A048888). L(1, n) = "1-step Lucas numbers" = A000012. L(2, n) = 2-step Lucas numbers = A000204. L(3, n) = 3-step Lucas numbers = A001644. L(4, n) = 4-step Lucas numbers = A001648 Tetranacci numbers A073817 without the leading term 4. L(5, n) = 5-step Lucas numbers = A074048 Pentanacci numbers with initial conditions a(0)=5, a(1)=1, a(2)=3, a(3)=7, a(4)=15. L(6, n) = 6-step Lucas numbers = A074584 Esanacci ("6-anacci") numbers. L(7, n) = 7-step Lucas numbers = A104621 Heptanacci-Lucas numbers. L(8, n) = 8-step Lucas numbers = A105754. L(9, n) = 9-step Lucas numbers = A105755. See A000295, A125129 for comments on partial sums of diagonals.

Programs

  • Sage
    def L(k, n):
        if n < 0:
            return -1
        a = [-1]*(k-1) + [k] # [-1, -1, ..., -1, k]
        for i in range(1, n+1):
            a[:] = a[1:] + [sum(a)]
        return a[-1]
    [L(k, n) for d in (1..12) for k, n in zip((d..1, step=-1), (1..d))] # Freddy Barrera, Jan 10 2019

Formula

L(k,n) = L(k,n-1) + L(k,n-2) + ... + L(k,n-k); L(k,n) = -1 for n < 0, and L(k,0) = k.
G.f. for row k: x*(dB(k,x)/dx)/(1-B(k,x)), where B(k,x) = x + x^2 + ... + x^k. - Petros Hadjicostas, Jan 24 2019

Extensions

Corrected by Freddy Barrera, Jan 10 2019

A251710 7-step Fibonacci sequence starting with (0,0,0,0,0,1,0).

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 1, 2, 4, 8, 16, 32, 63, 126, 251, 500, 996, 1984, 3952, 7872, 15681, 31236, 62221, 123942, 246888, 491792, 979632, 1951392, 3887103, 7742970, 15423719, 30723496, 61200104, 121908416, 242837200, 483723008, 963558913, 1919374856, 3823325993
Offset: 0

Views

Author

Arie Bos, Dec 07 2014

Keywords

Comments

a(n+7) equals the number of n-length binary words avoiding runs of zeros of lengths 7i+6, (i=0,1,2,...). - Milan Janjic, Feb 26 2015

Crossrefs

Other 7-step Fibonacci sequences are A066178, A104621, A122189, A251711, A251712, A251713, A251714.

Programs

  • J
    NB. see A251713 for the program and apply it to 0 0 0 0 0 1 0.
  • Mathematica
    LinearRecurrence[Table[1, {7}], {0, 0, 0, 0, 0, 1, 0}, 40] (* Michael De Vlieger, Dec 09 2014 *)

Formula

a(n+7) = a(n) + a(n+1) + a(n+2) + a(n+3) + a(n+4) + a(n+5) + a(n+6).
G.f.: x^5*(x-1)/(-1+x+x^2+x^3+x^4+x^5+x^6+x^7) . - R. J. Mathar, Mar 28 2025
a(n) = A066178(n-5)-A066178(n-6). - R. J. Mathar, Mar 28 2025

A251711 7-step Fibonacci sequence starting with (0,0,0,0,1,0,0).

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 1, 2, 4, 8, 16, 31, 62, 124, 247, 492, 980, 1952, 3888, 7745, 15428, 30732, 61217, 121942, 242904, 483856, 963824, 1919903, 3824378, 7618024, 15174831, 30227720, 60212536, 119941216, 238918608, 475917313, 948010248, 1888402472, 3761630113
Offset: 0

Views

Author

Arie Bos, Dec 07 2014

Keywords

Crossrefs

Other 7-step Fibonacci sequences are A066178, A104621, A122189, A251710, A251712, A251713, A251714.

Programs

  • J
    NB. see A251713 for the program and apply it to 0 0 0 0 1 0 0.
  • Mathematica
    LinearRecurrence[Table[1, {7}], {0, 0, 0, 0, 1, 0, 0}, 40] (* Michael De Vlieger, Dec 09 2014 *)

Formula

a(n+7) = a(n) + a(n+1) + a(n+2) + a(n+3) + a(n+4) + a(n+5) + a(n+6).
G.f.: x^4*(-1+x+x^2)/(-1+x+x^2+x^3+x^4+x^5+x^6+x^7) . - R. J. Mathar, Mar 28 2025
a(n) = A066178(n-4)-A066178(n-5)-A066178(n-6). - R. J. Mathar, Mar 28 2025
Showing 1-10 of 17 results. Next