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-4 of 4 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)

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
Showing 1-4 of 4 results.