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 21-30 of 48 results. Next

A373827 Position of first appearance of n in the run-lengths (differing by 0) of the antirun-lengths (differing by > 2) of the odd primes.

Original entry on oeis.org

4, 1, 38, 6781, 26100, 23238
Offset: 1

Views

Author

Gus Wiseman, Jun 22 2024

Keywords

Comments

Positions of first appearances in A373820 (run-lengths of A027833 with 1 prepended).

Examples

			The odd primes begin:
3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, ...
with antiruns (differing by > 2):
(3), (5), (7,11), (13,17), (19,23,29), (31,37,41), (43,47,53,59), ...
with lengths:
1, 1, 2, 2, 3, 3, 4, 3, 6, 2, 5, 2, 6, 2, 2, 4, 3, 5, 3, 4, 5, 12, ...
which have runs:
(1,1), (2,2), (3,3), (4), (3), (6), (2), (5), (2), (6), (2,2), (4), ...
with lengths:
2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
with positions of first appearances a(n).
		

Crossrefs

Positions of first appearances in A373820.
For runs instead of antiruns we have A373825, sorted A373824.
The sorted version is A373826.
A000040 lists the primes.
A001223 gives differences of consecutive primes, run-lengths A333254, run-lengths of run-lengths A373821.
A046933 counts composite numbers between primes.
A065855 counts composite numbers up to n.
A071148 gives partial sums of odd primes.

Programs

  • Mathematica
    t=Length/@Split[Length /@ Split[Select[Range[3,10000],PrimeQ],#1+2!=#2&]//Most]//Most;
    spna[y_]:=Max@@Select[Range[Length[y]],SubsetQ[t,Range[#1]]&];
    Table[Position[t,k][[1,1]],{k,spna[t]}]

A058845 Numbers n such that the sum of the first n odd primes is palindromic.

Original entry on oeis.org

1, 2, 49, 54, 172, 921, 1421, 12485, 78653, 1969457, 5606014, 90638394
Offset: 1

Views

Author

Patrick De Geest, Dec 15 2000

Keywords

Comments

a(13) > 2.8*10^12, if it exists. - Giovanni Resta, Sep 01 2018

Examples

			Palindromes are 3 + 5 + 7 + 11 + 13 + 17 + ... + z. For values of z see A058846.
		

Crossrefs

Programs

A058846 Numbers k such that the sum of odd primes up to k is palindromic.

Original entry on oeis.org

3, 5, 229, 257, 1031, 7213, 11863, 133853, 1002073, 31924583, 97137589, 1837875227
Offset: 1

Views

Author

Patrick De Geest, Dec 15 2000

Keywords

Comments

Sum is 3 + 5 + 7 + 11 + 13 + 17 + ... + k.
a(13) > 8.79*10^13, if it exists. - Giovanni Resta, Sep 01 2018

Crossrefs

Programs

  • PARI
    lista(nn) = {s = 0; p = 2; for (n=1, nn, p = nextprime(p+1); s += p; d = digits(s); if (Vecrev(d) == d, print1(p, ", ")););} \\ Michel Marcus, Aug 09 2017
    
  • Python
    from sympy import primerange
    def ispal(n): s = str(n); return s == s[::-1]
    def afind(limit):
      s = 0
      for p in primerange(3, limit):
        s += p
        if ispal(s): print(p, end=", ")
    afind(2*10**6) # Michael S. Branicky, Mar 05 2021

Formula

a(n) = A065091(A058845(n)). - R. J. Mathar, Sep 09 2015

A058847 Palindromes that are the sum of consecutive initial odd primes.

Original entry on oeis.org

3, 8, 5115, 6336, 81218, 3091903, 7843487, 792727297, 37706560773, 30398022089303, 263888373888362, 81120957675902118
Offset: 1

Views

Author

Patrick De Geest, Dec 15 2000

Keywords

Comments

3 + 5 + 7 + 11 + 13 + 17 + ... + z = n. For values of z see A058846.
a(13) > 1.2*10^26, if it exists. - Giovanni Resta, Sep 01 2018

Crossrefs

Programs

  • Mathematica
    palQ[n_]:=Module[{idn=IntegerDigits[n]},idn==Reverse[idn]]; Select[ Accumulate[ Prime[Range[2,25000000]]],palQ] (* The program takes a long time to run and only generates the first 11 terms of the sequence *) (* Harvey P. Dale, Aug 24 2014 *)

Formula

a(n) = A071148(A058845(n)). - R. J. Mathar, Sep 09 2015

A097961 Numbers k such that the sum of the first k odd primes is divisible by k.

Original entry on oeis.org

1, 2, 3, 60, 73, 357, 690, 970, 1560, 1844, 2016, 2071, 3267, 7034, 22388, 37244, 137166, 808334, 1126996, 3420839, 4971830, 14647946, 15553569, 21957090, 31327140, 90514444, 98576118, 204198604, 210662116, 553825420, 1395717645, 2820805440, 6780317160
Offset: 1

Views

Author

Anne M. Donovan (anned3005(AT)aol.com), Oct 22 2004

Keywords

Examples

			a(1) = 1 since 3 is divisible by 1.
a(2) = 2 since 3 + 5 = 8 is divisible by 2.
a(3) = 3 since 3 + 5 + 7 = 15 is divisible by 3.
a(4) != 4 since 3 + 5 + 7 + 11 = 26 is not divisible by 4.
98576118 * 977748014 = 96382603602329652.
		

Crossrefs

Programs

  • Mathematica
    NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; p = 2; s = 0; Do[p = NextPrim[p]; s = s + p; If[ Mod[s, n] == 0, Print[n]], {n, 151666666}] (* Robert G. Wilson v, Oct 23 2004 *)
  • Python
    from sympy import sieve
    L = sieve.primerange(3, 1.7*10**11); s, k = 0, 0
    for p in L:
        s += p;  k += 1
    if s%k == 0: print(k, end = ", ")  # Ya-Ping Lu, Jun 16 2023

Formula

Numbers k such that A071148(k)/k or (A007504(k+1)-2)/k is an integer.
Sum_{i=1..a(n)} prime(i) = n*A363477(n). - Ya-Ping Lu, Jun 16 2023

Extensions

More terms from Robert G. Wilson v, Oct 23 2004
a(28)-a(30) from Rémy Sigrist, Sep 25 2016
a(31)-a(33) from Ya-Ping Lu, Jun 16 2023

A286263 The smallest weight possible for a prime vector of order n.

Original entry on oeis.org

2, 8, 19, 26, 43, 56, 79, 104, 127, 166, 223, 258, 307, 348
Offset: 1

Views

Author

Dmitry Kamenetsky, May 05 2017

Keywords

Comments

A prime vector of order n is an array of n distinct primes P = (p_1, p_2, ..., p_n), such that every sum of an odd number of consecutive elements is also prime. The weight of the prime vector is the sum of its elements. For full details see Kamenetsky's paper.
Calculations by Kamenetsky and J. K. Andersen show that a(15-17) are likely to be 443, 522 and 641.
Calculations by J. K. Andersen show that a(18-21) are likely to be 762, 881, 1002 and 1259.
J. K. Andersen found the best upper bounds for a(22-23) as 1716 and 1931.
For odd n, a(n) <= A068873(n) (smallest prime which is a sum of n distinct primes).
For even n, a(n) <= A071148(n) (sum of the first n odd primes).

Examples

			The best solution for n=5 is (3,11,5,7,17) with a weight of 43. This is a prime vector because all the generated sums are prime: 3+11+5=19, 11+5+7=23, 5+7+17=29, 3+11+5+7+17=43.
		

Crossrefs

A343809 Divide the positive integers into subsets of lengths given by successive primes, then reverse the order of terms in each subset.

Original entry on oeis.org

2, 1, 5, 4, 3, 10, 9, 8, 7, 6, 17, 16, 15, 14, 13, 12, 11, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59
Offset: 1

Views

Author

Paolo Xausa, Apr 30 2021

Keywords

Comments

From Omar E. Pol, Apr 30 2021: (Start)
Irregular triangle read by rows T(n,k) in which row n lists the next p positive integers in decreasing order, where p is the n-th prime, with n >= 1.
The triangle has the following properties:
Column 1 gives the nonzero terms of A007504.
Column 2 gives A237589.
Column 3 gives A071148.
Column 4 gives the terms > 2 of A343859.
Column 5 gives the absolute values of the terms < -1 of A282329.
Column 6 gives the terms > 7 of A082548.
Column 7 gives the terms > 6 of A115030.
Records are in the column 1.
Indices of records are in the right border.
Right border gives A014284.
Row lengths give A000040.
Row products give A078423.
Row sums give A034956. (End)

Examples

			From _Omar E. Pol_, Apr 30 2021: (Start)
Written as an irregular triangle in which row lengths give A000040 the sequence begins:
   2,  1;
   5,  4,  3;
  10,  9,  8,  7,  6;
  17, 16, 15, 14, 13, 12, 11;
  28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18;
  41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29;
  58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42;
  77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59;
  ...
(End)
		

Crossrefs

Programs

  • Maple
    R:= NULL: t:= 1:
    for i from 1 to 20 do
      p:= ithprime(i);
      R:= R, seq(i,i=t+p-1..t,-1);
      t:= t+p;
    od:
    R; # Robert Israel, Apr 30 2021
  • Mathematica
    With[{nn=10},Reverse/@TakeList[Range[Total[Prime[Range[nn]]]],Prime[Range[nn]]]]//Flatten (* Harvey P. Dale, Apr 27 2022 *)

Formula

T(n,k) = A007504(n) - k + 1, with n >= 1 and 1 <= k <= A000040(n). - Omar E. Pol, May 01 2021

A373817 Positions of terms > 1 in the run-lengths of the first differences of the odd primes.

Original entry on oeis.org

2, 14, 34, 36, 42, 49, 66, 94, 98, 100, 107, 117, 147, 150, 169, 171, 177, 181, 199, 219, 250, 268, 315, 333, 361, 392, 398, 435, 477, 488, 520, 565, 570, 585, 592, 595, 628, 642, 660, 666, 688, 715, 744, 765, 772, 778, 829, 842, 897, 906, 931, 932, 961, 1025
Offset: 1

Views

Author

Gus Wiseman, Jun 23 2024

Keywords

Comments

Positions of terms > 1 in A333254. In other words, the a(n)-th run of differences of odd primes has length > 1.

Examples

			Primes 54 to 57 are {251, 257, 263, 269}, with differences (6,6,6). This is the 49th run, and the first of length > 2.
		

Crossrefs

Positions of adjacent equal prime gaps are A064113.
Positions of adjacent unequal prime gaps are A333214.
Positions of terms > 1 in A333254, run-lengths A373821, firsts A335406.
A000040 lists the primes, differences A001223.
A027833 gives antirun lengths of odd primes, run-lengths A373820.
A046933 counts composite numbers between primes.
A065855 counts composite numbers up to n.
A071148 gives partial sums of odd primes.

Programs

  • Mathematica
    Join@@Position[Length /@ Split[Differences[Select[Range[1000],PrimeQ]]] // Most,x_Integer?(#>1&)]

A373823 Half the sum of the n-th maximal run of first differences of odd primes.

Original entry on oeis.org

2, 2, 1, 2, 1, 2, 3, 1, 3, 2, 1, 2, 6, 1, 3, 2, 1, 3, 2, 3, 4, 2, 1, 2, 1, 2, 7, 2, 3, 1, 5, 1, 6, 2, 6, 1, 5, 1, 2, 1, 12, 2, 1, 2, 3, 1, 5, 9, 1, 3, 2, 1, 5, 7, 2, 1, 2, 7, 3, 5, 1, 2, 3, 4, 6, 2, 3, 4, 2, 4, 5, 1, 5, 1, 3, 2, 3, 4, 2, 1, 2, 6, 4, 2, 4, 2, 3
Offset: 1

Views

Author

Gus Wiseman, Jun 22 2024

Keywords

Comments

Halved run-sums of A001223.

Examples

			The odd primes are:
3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, ...
with first differences:
2, 2, 4, 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 6, 6, 2, 6, 4, 2, 6, 4, 6, 8, ...
with runs:
(2,2), (4), (2), (4), (2), (4), (6), (2), (6), (4), (2), (4), (6,6), ...
with halved sums a(n).
		

Crossrefs

Halved run-sums of A001223.
For run-lengths we have A333254, run-lengths of run-lengths A373821.
Multiplying by two gives A373822.
A000040 lists the primes.
A027833 gives antirun lengths of odd primes (partial sums A029707).
A046933 counts composite numbers between primes.
A065855 counts composite numbers up to n.
A071148 gives partial sums of odd primes.
A373820 gives run-lengths of antirun-lengths of odd primes.

Programs

  • Mathematica
    Total/@Split[Differences[Select[Range[3,1000],PrimeQ]]]/2

A134182 Difference between the sums of the first 10^n odd primes and the first 10^n odd positive integers > 1.

Original entry on oeis.org

38, 14478, 2688838, 396250152, 52261798440, 6472980453364, 770530574266708, 89262852894258444, 10138479465982004008, 1134379338819040693132, 125436174619351016716668, 13738971133578180130155676, 1493061976858459711065006050, 161191473337955042966337346114
Offset: 1

Views

Author

Enoch Haga, Oct 13 2007

Keywords

Comments

Original name: 10^n-th difference between cumulative prime and odd sums.
Beginning at 3, compute the sums of the prime and odd sequences at 10^n and take the difference.

Examples

			a(1) = (3 + 5 + 7 + 11 + 13 + 17 + 19 + 23 + 29 + 31) - (3 + 5 + 7 + 9 + 11 + 13 + 15 + 17 + 19 + 21) = 158 - 120 = 38.
a(2) = 14478 because at 10^2, 100 sums of primes and odds, the prime sum is 24678, the odd sum is 10200 and the difference is 14478.
		

Crossrefs

Programs

  • UBASIC
    10 N=1: A=2
    20 A=nxtprm(A): B=B+A
    30 N=N+2: D=D+N
    40 if C=9 then print A;N;B;D;B-D: stop
    50 C=C+1: if C<10 then 20

Formula

a(n) = A134181(10^n).
a(n) = A099824(n) + prime(10^n+1) - (10^n*(10^n+2)) - 2. - Chai Wah Wu, Mar 30 2020
a(n) = A071148(10^n) - (10^n+1)^2 + 1, where A071148 are the partial sums of odd primes, and N^2 is the sum of the first N odd integers. - M. F. Hasler, Aug 08 2025

Extensions

Edited by M. F. Hasler, Aug 08 2025
Previous Showing 21-30 of 48 results. Next