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.

A356442 a(n) is the least positive even number that is the unordered sum of two primes congruent mod 10 in exactly n ways.

Original entry on oeis.org

2, 4, 26, 86, 126, 174, 264, 324, 396, 456, 546, 594, 624, 876, 966, 984, 924, 954, 1326, 1344, 1386, 1512, 1596, 1638, 1848, 1764, 2046, 2226, 2838, 2574, 2706, 2604, 2772, 2436, 3366, 3066, 2964, 3432, 3894, 3738, 3234, 3696, 3654, 4074, 4446, 4158, 4368, 4494, 4788, 5016, 4746, 5754, 4914
Offset: 0

Views

Author

J. M. Bergot and Robert Israel, Aug 07 2022

Keywords

Comments

a(n) is the least even number k such that there are exactly n unordered pairs of primes (p,q) with p + q = k and p and q have the same last decimal digit.

Examples

			a(3) = 86 because 86 = 3 + 83 = 13 + 73 = 43 + 43, all summands being prime with last digit 3, and 86 is the least even number that works.
		

Crossrefs

Cf. A023036.

Programs

  • Maple
    f:= proc(m) local d, p;
      if m mod 10 = 0 then return 0 fi;
      d:= chrem([m/2 mod 5, 1],[5,2]);
      nops(select(p -> isprime(p) and isprime(m-p), [seq(p,p=d..m/2,10)]))
    end proc:
    f(4):= 1:
    M:= 100: # to get a(0)..a(M)
    V:= Array(0..M): count:= 0:
    for m from 2 by 2 while count < M+1 do
      v:= f(m);
      if v <= M and V[v] = 0 then V[v]:= m; count:= count+1 fi
    od:
    convert(V,list);