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-6 of 6 results.

A104621 Heptanacci-Lucas numbers.

Original entry on oeis.org

7, 1, 3, 7, 15, 31, 63, 127, 247, 493, 983, 1959, 3903, 7775, 15487, 30847, 61447, 122401, 243819, 485679, 967455, 1927135, 3838783, 7646719, 15231991, 30341581, 60439343, 120393007, 239818559, 477709983, 951581183, 1895515647, 3775799303, 7521257025
Offset: 0

Views

Author

Jonathan Vos Post, Mar 17 2005

Keywords

Comments

This 7th-order linear recurrence is a generalization of the Lucas sequence A000032. Mario Catalani would refer to this is a generalized heptanacci sequence, had he not stopped his series of sequences after A001644 "generalized tribonacci", A073817 "generalized tetranacci", A074048 "generalized pentanacci", A074584 "generalized hexanacci." T. D. Noe and I have noted that each of these has many more primes than the corresponding tribonacci A000073 (see A104576), tetranacci A000288 (see A104577), pentanacci, hexanacci and heptanacci (see A104414). For primes in Heptanacci-Lucas numbers, see A104622. For semiprimes in Heptanacci-Lucas numbers, see A104623.

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (-7+6*x+ 5*x^2+4*x^3+3*x^4+2*x^5+x^6)/(-1+x +x^2+x^3+x^4+x^5+x^6+x^7) )); // G. C. Greubel, Apr 22 2019
    
  • Maple
    A104621 := proc(n)
        option remember;
        if n <=6 then
            op(n+1,[7, 1, 3, 7, 15, 31, 63])
        else
            add(procname(n-i),i=1..7) ;
        end if;
    end proc: # R. J. Mathar, Mar 26 2015
  • 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]; Table[a[n], {n,0,40}] (* Robert G. Wilson v, Mar 17 2005 *)
    LinearRecurrence[{1, 1, 1, 1, 1, 1, 1}, {7, 1, 3, 7, 15, 31, 63}, 40] (* Vladimir Joseph Stephan Orlovsky, Feb 08 2012 *)
  • PARI
    my(x='x+O('x^40)); Vec((-7+6*x+5*x^2+4*x^3+3*x^4+2*x^5+x^6)/(-1+x +x^2+x^3+x^4+x^5+x^6+x^7)) \\ G. C. Greubel, Dec 18 2017
    
  • PARI
    polsym(polrecip(1-x-x^2-x^3-x^4-x^5-x^6-x^7), 40) \\ G. C. Greubel, Apr 22 2019
    
  • Sage
    ((-7+6*x+5*x^2+4*x^3+3*x^4+2*x^5+x^6)/(-1+x +x^2+x^3+x^4+x^5+x^6 +x^7)).series(x, 41).coefficients(x, sparse=False) # G. C. Greubel, Apr 22 2019

Formula

a(n) = a(n-1) + a(n-2) + a(n-3) + a(n-4) + a(n-5) + a(n-6) + a(n-7); a(0) = 7, a(1) = 1, a(2) = 3, a(3) = 7, a(4) = 15, a(5) = 31, a(6) = 63.
From R. J. Mathar, Nov 16 2007: (Start)
G.f.: (7 - 6*x - 5*x^2 - 4*x^3 - 3*x^4 - 2*x^5 - x^6)/(1 - x - x^2 - x^3 - x^4 - x^5 - x^6 - x^7).
a(n) = 7*A066178(n) - 6*A066178(n-1) - 5*A066178(n-2) - ... - 2*A066178(n-5) - A066178(n-6) if n >= 6. (End)

A104577 Indices of prime generalized tetranacci numbers, A073817.

Original entry on oeis.org

2, 3, 8, 9, 16, 19, 24, 27, 46, 68, 71, 78, 107, 198, 309, 377, 477, 1057, 1631, 2419, 3974, 4293, 8247, 10513, 10709, 12011, 15042, 30543, 31607, 39664, 47552, 145858
Offset: 1

Views

Author

T. D. Noe, Mar 16 2005

Keywords

Comments

The sequence of generalized tetranacci numbers is defined as beginning with 1, 3, 7, 15. Subsequent terms are the sum of the previous four terms. Note that the sequence of these generalized tetranacci numbers has many more primes than the tetranacci sequence A000078 (whose prime indices are in A104534).

Crossrefs

Cf. A104576 (indices of prime generalized tribonacci numbers).

Programs

  • Mathematica
    a={-1, -1, -1, 4}; Do[s=Plus@@a; a=RotateLeft[a]; a[[4]]=s; If[PrimeQ[s], Print[n]], {n, 30000}]

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

A073446 Product L(n)*S(n), where L(n) are Lucas numbers and S(n) are Lucas 3-step numbers = A000032(n) * A001644(n).

Original entry on oeis.org

6, 1, 9, 28, 77, 231, 702, 2059, 6157, 18316, 54489, 162185, 482678, 1436397, 4274853, 12722028, 37861085, 112675763, 335326230, 997940307, 2969899037, 8838503884, 26303639349, 78280380217, 232964641030, 693309407681
Offset: 0

Views

Author

Mario Catalani (mario.catalani(AT)unito.it), Aug 01 2002

Keywords

Comments

a(n) is also the trace of the matrix R^n, where R is the Kronecker product of the Fibonacci matrix (Fibomatrix): first row (1,1), second row (1,0), times the Tribomatrix: first row (1,1,0), second row (1,0,1), third row (1,0,0).
a(n) is semiprime iff n is an element of A001606 (an index of a prime Lucas number) and an element of A104576 (an index of a prime Lucas 3-step number). The only known such are n = 2, 4, 7, 8 (through 67661). - Jonathan Vos Post, May 10 2005

References

  • Thomas Koshy, "Fibonacci and Lucas Numbers with Applications", John Wiley and Sons, 2001.

Crossrefs

Programs

  • GAP
    a:=[6,1,9,28,77,231];; for n in [7..40] do a[n]:=a[n-1]+4*a[n-2] +5*a[n-3]+2*a[n-4]-a[n-5]+a[n-6]; od; a; # G. C. Greubel, Feb 19 2019
  • Magma
    m:=40; R:=PowerSeriesRing(Integers(), m); Coefficients(R!( (6-5*x-16*x^2-15*x^3-4*x^4+x^5)/(1-x-4*x^2-5*x^3-2*x^4+x^5-x^6) )); // G. C. Greubel, Feb 19 2019
    
  • Mathematica
    CoefficientList[Series[(6-5x-16x^2-15x^3-4x^4+x^5)/(1-x-4x^2-5x^3-2x^4 +x^5-x^6), {x, 0, 50}], x]
  • PARI
    my(x='x+O('x^40)); Vec((6-5*x-16*x^2-15*x^3-4*x^4+x^5)/(1-x-4*x^2-5*x^3-2*x^4+x^5-x^6)) \\ G. C. Greubel, Feb 19 2019
    
  • Sage
    ((6-5*x-16*x^2-15*x^3-4*x^4+x^5)/(1-x-4*x^2-5*x^3-2*x^4+x^5-x^6)).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Feb 19 2019
    

Formula

a(n) = a(n-1)+4*a(n-2)+5*a(n-3)+2*a(n-4)-a(n-5)+a(n-6), a(0)=6, a(1)=1, a(2)=9, a(3)=28, a(4)=77, a(5)=231.
G.f.: (6-5*x-16*x^2-15*x^3-4*x^4+x^5)/(1-x-4*x^2-5*x^3-2*x^4+x^5-x^6).

A105762 Primes in A001644 (the Lucas 3-step numbers).

Original entry on oeis.org

3, 7, 11, 71, 131, 241, 443, 1499, 196331, 86992799, 541292033, 292997064989357251, 129824812729295169371, 238785058551151434437, 5026368970977284897651, 105803877284856287511991
Offset: 1

Views

Author

T. D. Noe, Apr 22 2005

Keywords

Crossrefs

Cf. A104576 (indices of prime Lucas 3-step numbers).

Programs

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

Formula

a(n) = A001644(A104576(n)). - Arthur O'Dwyer, Jul 31 2024

Extensions

Name clarified by Arthur O'Dwyer, Jul 31 2024

A106627 Product L(n)*L_4(n), where L(n) are Lucas numbers and L_4(n) are Lucas 4-step numbers.

Original entry on oeis.org

8, 1, 9, 28, 105, 286, 918, 2871, 8977, 27892, 87084, 271635, 847182, 2641991, 8240325, 25700488, 80156033, 249994997, 779700654, 2431777739, 7584375260
Offset: 0

Views

Author

Jonathan Vos Post, May 11 2005

Keywords

Comments

a(n) is semiprime iff n is an element of A001606 (an index of a prime Lucas number) and an element of A104577 (an index of a prime Lucas 4-step number). The only known such are n = 2, 8, 16, 19, 71, (through 145858).

Examples

			a(0) = 8 because L(0) * L_4(0) = 2 * 4.
a(1) = 1 because L(1) * L_4(1) = 1 * 1.
a(2) = 9 because L(2) * L_4(2) = 3 * 3.
a(3) = 28 because L(3) * L_4(3) = 4 * 7.
a(4) = 105 because L(4) * L_4(4) = 7 * 15.
a(5) = 286 because L(5) * L_4(5) = 11 * 26.
a(6) = 918 because L(6) * L_4(6) = 18 * 51.
		

Crossrefs

Programs

  • GAP
    a:=[8,1,9,28,105,286,918,2871];; for n in [9..30] do a[n]:=a[n-1] +4*a[n-2]+5*a[n-3]+9*a[n-4]+3*a[n-5]-2*a[n-6]+a[n-7]-a[n-8]; od; a; # G. C. Greubel, Feb 19 2019
  • Magma
    I:=[8,1,9,28,105,286,918,2871]; [n le 8 select I[n] else Self(n-1)+4*Self(n-2)+5*Self(n-3)+9*Self(n-4)+3*Self(n-5)-2*Self(n-6) + Self(n-7)-Self(n-8): n in [1..30]]; // G. C. Greubel, Feb 19 2019
    
  • Mathematica
    LinearRecurrence[{1,4,5,9,3,-2,1,-1}, {8,1,9,28,105,286,918,2871}, 40] (* G. C. Greubel, Feb 19 2019 *)
  • PARI
    my(x='x+O('x^40)); Vec((8-7*x-24*x^2-25*x^3-36*x^4-9*x^5+4*x^6 -x^7)/(1-x-4*x^2-5*x^3-9*x^4-3*x^5+2*x^6-x^7+x^8)) \\ G. C. Greubel, Feb 19 2019
    
  • Sage
    ((8-7*x-24*x^2-25*x^3-36*x^4-9*x^5+4*x^6-x^7)/(1-x-4*x^2-5*x^3 -9*x^4-3*x^5+2*x^6-x^7+x^8)).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Feb 19 2019
    

Formula

a(n) = A000032(n) * A073817(n).
a(n) = +a(n-1) +4*a(n-2) +5*a(n-3) +9*a(n-4) +3*a(n-5) -2*a(n-6) +a(n-7) -a(n-8). - R. J. Mathar, Dec 22 2010
G.f.: (8 -7*x -24*x^2 -25*x^3 -36*x^4 -9*x^5 +4*x^6 -x^7) / (1 -x -4*x^2 -5*x^3 -9*x^4 -3*x^5 +2*x^6 -x^7 +x^8). - Colin Barker, Jun 17 2012
Showing 1-6 of 6 results.