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.

A342962 a(n) is the least prime that starts a string of exactly n distinct primes p_1, p_2, ..., p_n where p_{i+1} = p_i+A085563(p_i), but p_n+A085563(p_n) is either not prime or equal to p_n.

Original entry on oeis.org

2, 29, 229, 5639, 35969, 54191353
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Mar 31 2021

Keywords

Comments

No further terms up to 10^9.

Examples

			a(3) = 229 because 229, 229+A085563(229) = 233, and 233+A085563(233) = 241 are prime but 241+A085563(241) = 243 is not.
		

Crossrefs

Programs

  • Maple
    f:= n -> n + convert(select(isprime,convert(n,base,10)),`+`):
    F:= proc(n) option remember; local t,x;
        x:= f(n);
      if x = n or not isprime(x) then 1 else 1+procname(x) fi
    end proc:
    V:= Vector(6): count:= 0: p:= 1:
    while count < 6 do
      p:= nextprime(p); v:= F(p);
      if v <= 6 and V[v] = 0 then V[v]:= p; count:= count+1 fi
    od:
    convert(V,list);

A342961 Primes p such that p + the sum of its prime digits is prime.

Original entry on oeis.org

11, 19, 29, 37, 41, 53, 61, 73, 89, 101, 109, 149, 181, 191, 199, 229, 233, 257, 269, 277, 281, 307, 331, 359, 379, 383, 401, 409, 419, 433, 449, 461, 491, 499, 563, 587, 593, 601, 619, 641, 653, 661, 673, 677, 691, 727, 797, 809, 811, 821, 881, 911, 919, 937, 941, 977, 991, 1009, 1019, 1033
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Mar 31 2021

Keywords

Examples

			a(3) = 29 is a term because it is prime, the sum of its prime digits is 2, and 29+2 = 31 is also prime.
		

Crossrefs

Includes A034844. Cf. A085563, A342962.

Programs

  • Maple
    f:= p -> p + convert(select(isprime,convert(p,base,10)),`+`):
    select(t -> isprime(t) and isprime(f(t)), [seq(i,i=3..2000,2)]);
  • Mathematica
    Select[Prime@Range@200,PrimeQ@Total[Join[{#},Select[IntegerDigits@#,PrimeQ]]]&] (* Giorgos Kalogeropoulos, Apr 01 2021 *)
  • PARI
    isok(p) = isprime(p) && isprime(p+sumdigits(p)); \\ Michel Marcus, Apr 01 2021

A341013 The cumulative sum of the prime digits so far in the sequence and the cumulative sum of the nonprime digits so far differ by n for all a(n) values.

Original entry on oeis.org

1, 3, 12, 16, 10, 34, 43, 56, 65, 78, 87, 100, 236, 258, 263, 285, 304, 326, 340, 359, 362, 395, 403, 430, 447, 474, 506, 528, 539, 560, 582, 593, 605, 623, 632, 650, 708, 744, 780, 807, 825, 852, 870, 935, 953, 1000, 1112, 1121, 1145, 1154, 1167, 1176
Offset: 1

Views

Author

Carole Dubois and Eric Angelini, Feb 02 2021

Keywords

Comments

The prime digits are 2, 3, 5 and 7; the nonprime digits are 0, 1, 4, 6, 8 and 9.
This is the lexicographically earliest sequence of distinct integers > 0 having this property.

Examples

			Say that the current sequence is S, the cumulative sum at any moment of the prime digits of S is P, the cumulative sum at any moment of the nonprime digits of S is N and the absolute difference |P-N| is D. We would then have:
S =  1, 3, 12, 16, 10, 34, 43, 56, 65, 78, 87, 100,...
P =  0  3   5   5   5   8  11  16  21  28  35   35
N =  1  1   2   9  10  14  18  24  30  38  46   47
D =  1  2   3   4   5   6   7   8   9  10  11   12 <-- this is = n
		

Crossrefs

Cf. A341012 (the cumulative sums of even vs odd digits differ by n).

A341161 The sum of the prime digits of m and the sum of the nonprime digits of m differ by n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 19, 119, 48, 49, 68, 69, 88, 89, 99, 199, 488, 489, 499, 689, 699, 889, 899, 999, 1999, 4889, 4899, 4999, 6899, 6999, 8899, 8999, 9999, 19999, 48899, 48999, 49999, 68999, 69999, 88999, 89999, 99999, 199999, 488999
Offset: 1

Views

Author

Carole Dubois and Eric Angelini, Feb 06 2021

Keywords

Comments

This is the lexicographically earliest sequence of distinct terms > 0 with this property.
The nonprime digits are 0, 1, 4, 6, 8 and 9; the prime digits are 2, 3, 5 and 7. After a(7) = 7 no more terms will show a prime digit.

Examples

			The sequence:     1, 2, 3, 4, 5, 6, 7, 8, 9, 19, 119, 48,...
Sum of prime dig. 0  2  3  0  5  0  7  0  0   0    0   0
Sum of nonprimes  1  0  0  4  0  6  0  8  9  10   11  12
Difference (= n)  1  2  3  4  5  6  7  8  9  10   11  12
		

Crossrefs

Showing 1-4 of 4 results.