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

A263203 Consider the numbers m such that m = prime(k) + prime(k+2i+1) = prime(k+i) + prime(k+i+1) for some i and k. The sequence lists the number of pairs (i,k) giving the same value m = A105093(n).

Original entry on oeis.org

1, 2, 2, 1, 4, 3, 4, 2, 2, 2, 1, 1, 2, 6, 5, 4, 1, 2, 1, 4, 4, 5, 7, 3, 6, 7, 1, 2, 1, 7, 10, 7, 7, 2, 6, 1, 5, 10, 12, 5, 10, 3, 5, 11, 9, 9, 8, 2, 6, 2, 2, 3, 10, 1, 5, 11, 10, 7, 7, 5, 3, 5, 5, 1, 4, 2, 4, 2, 5, 7, 4, 5, 8, 7, 6, 5, 3, 7, 13, 1, 1, 9, 5, 1
Offset: 1

Views

Author

Michel Lagneau, Oct 12 2015

Keywords

Comments

The form m = prime(k) + prime(k+2i+1) = prime(k+i) + prime(k+i+1) is a generalization of A105093 (form prime(k) + prime(k+3) = prime(k+1) + prime(k+2)), and the set of the numbers m is exactly A105093(n).

Examples

			a(6) = 3 because A105093(6)= 84 and:
for (i,k)=(1,12), prime(12)+ prime(15)= prime(13)+ prime(14)=37+47=41+43=84;
for (i,k)=(2,11), prime(11)+ prime(16)= prime(12)+ prime(15)=31+53=37+47=84;
for (i,k)=(4,9), prime(9)+ prime(18)= prime(13)+ prime(14)=23+61=41+43=84.
So, we find 3 pairs (i,k) giving m = 84.
		

Crossrefs

Cf. A105093.

Programs

  • Maple
    with(numtheory):nn:=5000:
    A105093:={18,24,30,36,60,84,120,162,204,210,216,240,288,330,372,390,456,520,540,624,726,762,798,840,852,882,924,978,990,1104,1140,1164,1200,1392,1410,1428,1530,1632,1650,1716,1740,1764,1794,1848,1974,2052,2100,2112,2184,2226,2334,2460,2580,2604,2688,2856,2970,2976,3054,3102,3138,3150,3180,3240,3500,3536,3612,3744,3750,3882,3966,3996,4056,4092,4170,4242,4680,4698,4728,4782,4810,5100,5376,5460}:n0:=nops(A105093):
      for n from 1 to n0 do:
       ii:=0:it:=0:q:=A105093[n]:
       for i from 1 to 100 do:
          for k from 1 to nn do:
            s1:=ithprime(k)+ithprime(k+2*i+1):
            s2:= ithprime(k+i)+ithprime(k+i+1):
            if s1=s2 and s1=q
            then
            it:=it+1:
            else
            fi:
           od:
          od:
           printf(`%d, `,it):
         od:

A333122 Numbers m such that m = prime(k) + prime(k+5) = prime(k+1) + prime(k+4) for some k.

Original entry on oeis.org

24, 30, 60, 84, 102, 210, 234, 288, 330, 378, 420, 426, 496, 528, 588, 594, 624, 690, 1050, 1156, 1200, 1218, 1302, 1336, 1410, 1470, 1484, 1638, 1650, 1680, 1686, 1716, 1734, 1740, 1746, 1788, 1848, 1908, 1918, 1930, 2052, 2154, 2226, 2364, 2410, 2580, 2892, 2934, 3168, 3524, 4080
Offset: 1

Views

Author

Marcin Barylski, Mar 08 2020

Keywords

Comments

Terms are always even because all primes used in this sequence are odd.
Conjecture: this sequence is infinite.

Examples

			a(1)=24 because prime(3)+prime(8)=prime(4)+prime(7)=5+19=7+17.
		

Crossrefs

Cf. A022889 (the prime(k) primes), A105093 (similar sequence).

Programs

  • Mathematica
    (#[[1]] + #[[6]]) & /@ Select[ Partition[ Prime@ Range@ 320, 6, 1], #[[1]] + #[[6]] == #[[2]] + #[[5]] &] (* Giovanni Resta, Mar 08 2020 *)
  • Python
    from sympy import nextprime
    A333122_list, plist = [], [2,3,5,7,11,13]
    while len(A333122_list) < 10000:
        m = plist[0]+plist[5]
        if m == plist[1]+plist[4]:
            A333122_list.append(m)
        plist = plist[1:] + [nextprime(plist[-1])] # Chai Wah Wu, Mar 30 2020

A358028 Primes p = prime(9*t+1) such that the 9 consecutive primes prime(9*t+1) .. prime(9*t+9) arranged in a 3 X 3 array have at least 2 equal sums along the rows, columns or main diagonals.

Original entry on oeis.org

2, 29, 67, 107, 157, 257, 311, 367, 541, 599, 709, 769, 829, 967, 1021, 1549, 1741, 1811, 1879, 1973, 2609, 2677, 3019, 3541, 3677, 4051, 4217, 4271, 4517, 4597, 4663, 4931, 5227, 5303, 5399, 5449, 5623, 5683, 5839, 6079, 6229, 6301, 6361, 6451, 6949, 7253, 7351, 7477, 7537, 7589, 7673
Offset: 1

Views

Author

Saish S. Kambali, Nov 12 2022

Keywords

Comments

Primes are taken in successive blocks of 9 and arranged, for t>=0,
| prime(9*t+1) | prime(9*t+2) | prime(9*t+3) |
| prime(9*t+4) | prime(9*t+5) | prime(9*t+6) |
| prime(9*t+7) | prime(9*t+8) | prime(9*t+9) |
There are 8 lines altogether: 3 rows, 3 columns, and 2 main diagonals.
The sum of the first row is never duplicated since any other line has a greater sum.
The sum of the last row is never duplicated since any other line has a smaller sum.

Examples

			2 is a term since its block of 9 primes is
  | 2  | 3  | 5  |
  | 7  | 11 | 13 |
  | 17 | 19 | 23 |
which has among its lines (3 + 11 + 19) = (17 + 11 + 5).
67 is a term since its block of 9 primes (the 3rd block) is 67..103,
  | 67 | 71 | 73 |
  | 79 | 83 | 89 |
  | 97 | 101| 103|
which has 67+83+103 = 97+83+73.
		

Crossrefs

Cf. A105093.
Subsequence of A031918 (by definition).

Programs

  • Mathematica
    a = {}
    row = {{1, 4, 7}, {2, 5, 8}, {3, 6, 9}};
    col = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}};
    dia = {{1, 3}, {5, 5}, {9, 7}};
    Duplicates[l_] :=
    Block[{i}, i[n_] := (i[n] = n; Unevaluated@Sequence[]); i /@ l]
    Do[If[Duplicates[
        Flatten[{Total[Prime[row + 9 n]], Total[Prime[col + 9 n]],
          Total[Prime[dia + 9 n]]}]] != {},
      AppendTo[a, Prime[9 n + 1]]], {n, 0, 110}]
    a (* Gerry Martens, Nov 12 2022 *)

Extensions

More terms from Gerry Martens, Nov 12 2022
Showing 1-3 of 3 results.