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.

Previous Showing 31-40 of 53 results. Next

A127493 Indices k such that the coefficient [x^1] of the polynomial Product_{j=0..4} (x-prime(k+j)) is prime.

Original entry on oeis.org

1, 5, 8, 9, 22, 29, 45, 49, 60, 69, 87, 89, 90, 107, 114, 124, 125, 131, 134, 138, 145, 156, 171, 183, 188, 191, 203, 204, 207, 212, 219, 255, 261, 290, 298, 303, 329, 330, 343, 344, 349, 354, 378, 397, 398, 400, 403, 454, 456, 466, 474, 515, 549, 560, 570, 578
Offset: 1

Views

Author

Artur Jasinski, Jan 16 2007

Keywords

Comments

A fifth-order polynomial with 5 roots which are the five consecutive primes from prime(k) onward is defined by Product_{j=0..4} (x-prime(k+j)). The sequence is a catalog of the cases where the coefficient of its linear term is prime.
Indices k such that e4(prime(k), prime(k+1), ..., prime(k+4)) is prime, where e4 is the elementary symmetric polynomial summing all products of four variables. - Charles R Greathouse IV, Jun 15 2015

Examples

			For k=2, the polynomial is (x-3)*(x-5)*(x-7)*(x-11)*(x-13) = x^5-39*x^4+574*x^3-3954*x^2+12673*x-15015, where 12673 is not prime, so k=2 is not in the sequence.
For k=5, the polynomial is x^5-83*x^4+2710*x^3-43490*x^2+342889*x-1062347, where 342889 is prime, so k=5 is in the sequence.
		

Crossrefs

Programs

  • Maple
    isA127493 := proc(k)
        local x,j ;
        mul( x-ithprime(k+j),j=0..4) ;
        expand(%) ;
        isprime(coeff(%,x,1)) ;
    end proc:
    A127493 := proc(n)
        option remember ;
        if n = 1 then
            1;
        else
            for a from procname(n-1)+1 do
                if isA127493(a) then
                    return a;
                end if;
            end do:
        end if;
    end proc:
    seq(A127493(n),n=1..60) ; # R. J. Mathar, Apr 23 2023
  • Mathematica
    a = {}; Do[If[PrimeQ[(Prime[x] Prime[x + 1]Prime[x + 2]Prime[x + 3] + Prime[x] Prime[x + 2]Prime[x + 3]Prime[x + 4] + Prime[x] Prime[x + 1]Prime[x + 3]Prime[x + 4] + Prime[x] Prime[x + 1]Prime[x + 2]Prime[x + 4] + Prime[x + 1] Prime[x + 2]Prime[x + 3]Prime[x + 4])], AppendTo[a, x]], {x, 1, 1000}]; a
  • PARI
    e4(v)=sum(i=1,#v-3, v[i]*sum(j=i+1,#v-2, v[j]*sum(k=j+1,#v-1, v[k]*vecsum(v[k+1..#v]))))
    pr(p, n)=my(v=vector(n)); v[1]=p; for(i=2,#v, v[i]=nextprime(v[i-1]+1)); v
    is(n,p=prime(n))=isprime(e4(pr(p,5)))
    v=List(); n=0; forprime(p=2,1e4, if(is(n++,p), listput(v,n))); Vec(v) \\ Charles R Greathouse IV, Jun 15 2015

Extensions

Definition and comment rephrased and examples added by R. J. Mathar, Oct 01 2009

A129109 Sums of three consecutive hexagonal numbers.

Original entry on oeis.org

7, 22, 49, 88, 139, 202, 277, 364, 463, 574, 697, 832, 979, 1138, 1309, 1492, 1687, 1894, 2113, 2344, 2587, 2842, 3109, 3388, 3679, 3982, 4297, 4624, 4963, 5314, 5677, 6052, 6439, 6838, 7249, 7672, 8107, 8554, 9013, 9484, 9967, 10462, 10969, 11488, 12019, 12562
Offset: 0

Views

Author

Jonathan Vos Post, May 24 2007

Keywords

Comments

Arises in hexagonal number analog to A129803 Triangular numbers which are the sum of three consecutive triangular numbers. What are the hexagonal numbers which are the sum of three consecutive hexagonal numbers? Prime for a(0) = 7, a(4) = 139, a(6) = 277, a(8) = 463, a(18) = 2113, a(22) = 3109, a(26) = 4297, a(38) = 9013, a(40) = 9967.

Examples

			a(0) = H(0) + H(1) + H(2) = 0 + 1 + 6 = 7 = 6*0^2 + 9*0 + 7.
a(1) = H(1) + H(2) + H(3) = 1 + 6 + 15 = 22 = 6*1^2 + 9*1 + 7.
a(2) = H(2) + H(3) + H(4) = 6 + 15 + 28 = 49 = 6*2^2 + 9*2 + 7.
		

Crossrefs

Programs

  • Magma
    I:=[7,22,49]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2)+1*Self(n-3): n in [1..40]]; // Vincenzo Librandi, Feb 20 2012
    
  • Mathematica
    LinearRecurrence[{3,-3,1},{7,22,49},50] (* Vincenzo Librandi, Feb 20 2012 *)
    Total/@Partition[PolygonalNumber[6,Range[0,50]],3,1] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Mar 14 2020 *)
  • PARI
    a(n)=6*n^2+9*n+7 \\ Charles R Greathouse IV, Feb 20 2012

Formula

a(n) = H(n) + H(n+1) + H(n+2) where H(n) = A000384(n) = n*(2*n-1).
a(n) = 6*n^2 + 9*n + 7.
From Colin Barker, Feb 20 2012: (Start)
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
G.f.: (7 + x + 4*x^2)/(1-x)^3. (End)
E.g.f.: (7 + 15*x + 6*x^2)*exp(x). - Elmo R. Oliveira, Nov 16 2024

A129111 Sums of three consecutive heptagonal numbers.

Original entry on oeis.org

8, 26, 59, 107, 170, 248, 341, 449, 572, 710, 863, 1031, 1214, 1412, 1625, 1853, 2096, 2354, 2627, 2915, 3218, 3536, 3869, 4217, 4580, 4958, 5351, 5759, 6182, 6620, 7073, 7541, 8024, 8522, 9035, 9563, 10106, 10664, 11237, 11825, 12428, 13046, 13679, 14327, 14990
Offset: 0

Views

Author

Jonathan Vos Post, May 24 2007

Keywords

Comments

Arises in heptagonal number analog to A129803 (Triangular numbers which are the sum of three consecutive triangular numbers).
What are the heptagonal numbers which are the sum of three consecutive heptagonal numbers?
Prime for a(2) = 59, a(3) = 107, a(7) = 449, a(10) = 863, a(11) = 1031, a(23) = 4217, a(26) = 5351, a(31) = 7541, a(42) = 13679, a(43) = 14327, a(46) = 16361, a(51) = 20051.

Examples

			a(0) = Hep(0) + Hep(1) + Hep(2) = 0 + 1 + 7 = 8 = (15/2)*0^2 + (21/2)*0 + 8.
a(1) = Hep(1) + Hep(2) + Hep(3) = 1 + 7 + 18 = 26 = (15/2)*1^2 + (21/2)*1 + 8.
a(2) = Hep(2) + Hep(3) + Hep(4) = 7 + 18 + 34 = 59 = (15/2)*2^2 + (21/2)*2 + 8.
		

Crossrefs

Programs

  • Magma
    I:=[8,26,59]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2)+1*Self(n-3): n in [1..40]]; // Vincenzo Librandi, Feb 20 2012
    
  • Mathematica
    LinearRecurrence[{3,-3,1},{8,26,59},50] (* Vincenzo Librandi, Feb 12 2012 *)
  • PARI
    a(n)=3*n*(5*n+7)/2+8 \\ Charles R Greathouse IV, Jun 17 2017
    
  • Python
    def a(n): return 3*n*(5*n+7)//2 + 8
    print([a(n) for n in range(44)]) # Michael S. Branicky, Aug 26 2021

Formula

a(n) = Hep(n) + Hep(n+1) + Hep(n+2) where Hep(n) = A000566(n) = n*(5*n-3)/2.
a(n) = (15/2)*n^2 + (21/2)*n + 8.
From Colin Barker, Feb 20 2012: (Start)
G.f.: (8 + 2*x + 5*x^2)/(1-x)^3.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). (End)
E.g.f.: exp(x)*(16 + 36*x + 15*x^2)/2. - Elmo R. Oliveira, Nov 16 2024

A130704 Palindromic primes whose squares are the sum of three consecutive primes.

Original entry on oeis.org

7, 11, 151, 191, 929, 10301, 14741, 15451, 76667, 98689, 1062601, 1153511, 1175711, 1215121, 1300031, 1317131, 1489841, 1597951, 3075703, 3127213, 3362633, 3441443, 7354537, 7472747, 7662667, 9127219, 9196919, 9451549, 9561659
Offset: 1

Views

Author

Robert G. Wilson v, Jun 19 2007

Keywords

Comments

The number of such palindromic primes less than 10^n: 1, 2, 5, 5, 10, 10, 30, 30, 141, 141, 843, 843, 5856, 5856, 42675, 42675, ....

Examples

			7^2 = 49 = 13 + 17 + 19.
11^2 = 121 = 37 + 41 + 43.
		

Programs

  • Mathematica
    NextPalindrome[n_] := Block[{l = Floor[Log[10, n] + 1], idn = IntegerDigits[n]}, If[ Union[idn] == {9}, Return[n + 2], If[l < 2, Return[n + 1], If[ FromDigits[ Reverse[ Take[idn, Ceiling[l/2]]]] > FromDigits[ Take[idn, -Ceiling[l/2]]], FromDigits[ Join[ Take[ idn, Ceiling[l/2]], Reverse[Take[idn, Floor[l/2]]]]], idfhn = FromDigits[ Take[idn, Ceiling[l/2]]] + 1; idp = FromDigits[ Join[ IntegerDigits[ idfhn], Drop[ Reverse[ IntegerDigits[ idfhn]], Mod[l, 2]]]]]]]];
    PrevPrim[n_] := Block[{k = n - 1}, While[ ! PrimeQ[k], k-- ]; k]; NextPrim[n_] := Block[{k = n + 1}, While[ ! PrimeQ[k], k++ ]; k]; fQ[n_] := Block[{p, q, r, s}, q = PrevPrim[ Ceiling[n^2/3]]; p = PrevPrim@q; r = NextPrim[ Floor[n^2/3]]; s = NextPrim@r; n^2 == p + q + r || n^2 == q + r + s];
    pd = 6; lst = {}; Do[pd = NextPalindrome@pd; If[ PrimeQ@pd && fQ@pd, AppendTo[lst, pd]], {n, 10^8}]; lst
    Select[Sqrt[#]&/@(Total/@Partition[Prime[Range[10^7]],3,1]),PalindromeQ[#]&&PrimeQ[#]&] (* The program generates the first 8 terms of the sequence. To generate more, increase the Range constant, but the program may take a long time to run. *) (* Harvey P. Dale, Jul 26 2023 *)

Formula

Intersection of A002385 and A034961.

A135277 a(n) = prime(2n-1) + prime(2n) + prime(2n+1).

Original entry on oeis.org

10, 23, 41, 59, 83, 109, 131, 159, 187, 211, 235, 269, 301, 319, 349, 395, 425, 457, 487, 519, 551, 581, 607, 661, 689, 713, 749, 789, 817, 841, 883, 931, 961, 1015, 1049, 1079, 1119, 1151, 1187, 1229, 1271, 1303, 1331, 1367, 1391, 1433, 1477, 1511, 1553, 1611
Offset: 1

Views

Author

Cino Hilliard, Dec 02 2007

Keywords

Comments

Original name was: Sum of staircase primes according to the rule: bottom + top + next top.

Crossrefs

Programs

  • Mathematica
    Table[Prime[n + 1] + Prime[n] + Prime[n + 2], {n, 1, 50}][[;; ;; 2]] (* G. C. Greubel, Oct 08 2016 *)
  • PARI
    g(n) = forstep(x=1,n,2,y=prime(x+1) + prime(x) + prime(x+2);print1(y","))
    
  • PARI
    a(n) = prime(2*n-1) + prime(2*n) + prime(2*n+1) \\ Charles R Greathouse IV, Oct 08 2016
    
  • Python
    from sympy import prime
    def a(n): return prime(2*n-1) + prime(2*n) + prime(2*n+1)
    print([a(n) for n in range(1, 51)]) # Michael S. Branicky, Oct 23 2021

Formula

We list the primes in staircase fashion as in A135274. The right diagonal, RD(n), is the set of top primes and the left diagonal, LD(n), is the set of bottom primes. Then a(n) = LD(n+1) + RD(n) + RD(n+2).
a(n) = A034961(2*n-1). - R. J. Mathar, Sep 10 2016

Extensions

New name from Charles R Greathouse IV, Oct 08 2016

A165981 Primes p which are equal to 2 plus the sum of three consecutive primes.

Original entry on oeis.org

17, 43, 61, 73, 271, 313, 331, 373, 397, 409, 521, 691, 733, 751, 773, 859, 1051, 1063, 1153, 1171, 1231, 1459, 1613, 1669, 1759, 1823, 1933, 2053, 2131, 2473, 2551, 2707, 2843, 2917, 2953, 2999, 3163, 3221, 3331, 3371, 3469, 3517, 3541, 3583, 3671, 3719
Offset: 1

Views

Author

Vincenzo Librandi, Oct 03 2009

Keywords

Examples

			17 is in the sequence because 2+3+5+7=17; 43=2+11+13+17; 271=2+83+89+97.
		

Crossrefs

Cf. A034961. [R. J. Mathar, Oct 14 2009]

Programs

  • Mathematica
    Select[Total[#] + 2 & / @Partition[Prime[Range[200]], 3, 1], PrimeQ] (* Vincenzo Librandi, Sep 13 2013 *)

Extensions

Edited by N. J. A. Sloane, Oct 04 2009
Terms from 313 to 773 inserted by R. J. Mathar, Oct 14 2009

A167807 Square pyramidal numbers which are sums of three consecutive primes.

Original entry on oeis.org

1015, 25585, 1623245, 2127685, 7838831, 8865649, 19849115, 52051769, 73998155, 88409285, 91753025, 161553785, 216862421, 289872105, 347016319, 382029011, 466430159, 835713879, 1077314939, 1223359835, 1509659555, 1584781241
Offset: 1

Views

Author

Zak Seidov, Nov 12 2009

Keywords

Comments

Intersection of A000330 (Square pyramidal numbers) and A034961 (Sums of three consecutive primes).

Examples

			1015=A034961(67)=A000330(14)
25585=A034961(1062)=A000330(42).
		

Crossrefs

Programs

  • Python
    from _future_ import division
    from sympy import nextprime, prevprime
    A167807_list = []
    for i in range(3,10**6):
        n = i*(i+1)*(2*i+1)//6
        p2 = prevprime(n//3)
        p1, p3 = prevprime(p2), nextprime(p2)
        q = p1+p2+p3
        while q <= n:
            if q == n:
                A167807_list.append(n)
            p1, p2, p3 = p2, p3, nextprime(p3)
            q = p1+p2+p3 # Chai Wah Wu, Dec 31 2015

Extensions

a(6)-a(22) from Donovan Johnson, Nov 15 2009

A171444 Sum of three consecutive reversed primes.

Original entry on oeis.org

10, 15, 23, 49, 113, 193, 194, 215, 137, 178, 100, 121, 122, 143, 204, 146, 187, 109, 130, 151, 172, 233, 215, 278, 481, 1103, 1903, 1913, 1933, 1163, 1583, 1793, 2603, 2023, 1843, 1263, 1873, 1493, 2103, 1523, 1343, 763, 1373, 2173, 1894, 1425
Offset: 1

Views

Author

Vincenzo Librandi, Dec 09 2009

Keywords

Examples

			(from primes 11, 13, and 17): 11 + 31 + 71 = 113;
(from primes 13, 17, and 19): 31 + 71 + 91 = 193;
(from primes 173, 179, and 181): 371 + 971 + 181 = 1523.
		

Crossrefs

Programs

  • Mathematica
    r[n_] := FromDigits[Reverse[IntegerDigits[n]]]; Table[r[Prime[n]] + r[Prime[n+1]] + r[Prime[n+2]], {n, 50}]

Formula

a(n) = r(p(n)) + r(p(n+1)) + r(p(n+2)) where p(n) is the n-th prime number and r(n) is the number obtained by the reversal of the digits of n (e.g., r(1230) = 321).

Extensions

More terms from Matthew Conroy, Dec 28 2010

A176603 Smallest prime p of three consecutive primes (p,q,r) with p + q + r equal to a lower twin prime.

Original entry on oeis.org

11, 17, 19, 83, 101, 281, 347, 349, 379, 401, 547, 641, 701, 839, 1103, 1151, 1171, 1187, 1279, 1303, 1409, 1439, 1489, 1823, 2089, 2243, 2857, 2861, 2927, 2999, 3083, 3203, 3347, 3359, 3467, 4639, 5087, 5233, 5861, 5879, 5881, 5923, 5953, 6007, 6299, 6491
Offset: 1

Views

Author

Ulrich Krug (leuchtfeuer37(AT)gmx.de), Apr 21 2010

Keywords

Comments

The sequence is constructed by intersecting A034961 and A001359, then printing the smallest of the three primes that sum to A034961.

Examples

			11+13+17 = 41 = prime(13), 43 = prime(14), 11 is 1st term.
17+19+23 = 59 = prime(17), 61 = prime(18), 17 is 2nd term.
Detailed list:
11+13+17 = 41, 17+19+23 = 59, 19+23+29 = 71, 83+89+97 = 269,
101+103+107 = 311, 281+283+293 = 857, 347+349+353 = 1049,
349+353+359 = 1061, 379+383+389 = 1151, 401+409+419 = 1229,
547+557+563 = 1667, 641+643+647 = 1931, 701+709+719 = 2129,
839+853+857 = 2549, 1103+1109+1117 = 3329, 1151+1153+1163 = 3467,
1171+1181+1187 = 3539, 1187+1193+1201 = 3581, 1279+1283+1289 = 3851,
1303+1307+1319 = 3929, 1409+1423+1427 = 4259, 1439+1447+1451 = 4337,
1489+1493+1499 = 4481, 1823+1831+1847 = 5501, 2089+2099+2111 = 6299,
2243+2251+2267 = 6761, 2857+2861+2879 = 8597, 2861+2879+2887 = 8627,
2927+2939+2953 = 8819, 2999+3001+3011 = 9011.
		

References

  • Theo Kempermann, Zahlentheoretische Kostproben, Harri Deutsch, 2. aktualisierte Auflage 2005.
  • Edmund Landau, Handbuch der Lehre von der Verteilung der Primzahlen, Band I, B. G. Teubner, Leipzig u. Berlin, 1909.

Crossrefs

Programs

Extensions

keyword:base removed, and sequence extended by R. J. Mathar, Apr 23 2010

A220569 Smallest prime divisor of prime(n) + prime(n+1) + prime(n+2).

Original entry on oeis.org

2, 3, 23, 31, 41, 7, 59, 71, 83, 97, 109, 11, 131, 11, 3, 173, 11, 199, 211, 223, 5, 251, 269, 7, 7, 311, 11, 7, 349, 7, 5, 11, 5, 439, 457, 3, 487, 503, 3, 13, 19, 5, 7, 19, 607, 3, 661, 7, 13, 701, 23, 17, 7, 3, 3, 11, 19, 829, 29, 857, 883, 911, 7, 941
Offset: 1

Views

Author

Zak Seidov, Dec 16 2012

Keywords

Examples

			a(6) = 7 because prime(6) + prime(6+1) + prime(6+2) = 13 + 17 + 19 = 49 and the smallest prime factor of 49 is 7.
		

Crossrefs

Programs

  • PARI
    {a=2; b=3; c=5; for(n=1, 100, s=a+b+c;
    dv=divisors(s); print1(dv[2]", "); a=b; b=c; c=nextprime(c+2))}
Previous Showing 31-40 of 53 results. Next