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 51-53 of 53 results.

A329590 Odd numbers k that cannot be expressed as k = p+q+r, with p prime and (q, r) a pair of twin primes.

Original entry on oeis.org

1, 3, 5, 7, 9, 33, 57, 93, 99, 129, 141, 153, 177, 183, 195, 213, 225, 243, 255, 261, 267, 273, 297, 309, 327, 333, 351, 369, 393, 411, 423, 435, 453, 477, 489, 501, 513, 519, 525, 537, 561, 573, 591, 597, 603, 633, 645, 657, 663, 675, 687, 693, 705, 711, 723
Offset: 1

Views

Author

Antonio Roldán, Feb 13 2020

Keywords

Examples

			33 can be expressed as the sum of three primes in 9 different ways:
33 = 11 + 11 + 11 = 13 + 13 + 7 = 17 + 11 + 5 = 17 + 13 + 3 = 19 + 7 + 7 = 19 + 11 + 3 = 23 + 5 + 5 = 23 + 7 + 3 = 29 + 2 + 2;
there is no pair of twin primes in the addends, so 33 is a term.
		

Crossrefs

Programs

  • PARI
    for(n = 0, 500, m = 2*n+1; v = 0; forprime(i = 3, m-8, j = (m-i)/2; if(isprime(j-1) && isprime(j+1), v = 1)); if(v == 0, print1(m,", ")))
    
  • PARI
    isok(k) = {if (! (k % 2), return (0)); forprime(p=3, k, if (isprime((k-p)\2-1) && isprime((k-p)\2+1), return(0));); return (1);} \\ Michel Marcus, Feb 16 2020

A345042 The lesser of twin primes that are also the sum of 3 consecutive primes.

Original entry on oeis.org

41, 59, 71, 269, 311, 857, 1049, 1061, 1151, 1229, 1667, 1931, 2129, 2549, 3329, 3467, 3539, 3581, 3851, 3929, 4259, 4337, 4481, 5501, 6299, 6761, 8597, 8627, 8819, 9011, 9281, 9629, 10067, 10091, 10427, 13931, 15287, 15731, 17597, 17657, 17681, 17789, 17921, 18047, 18911, 19541, 20231
Offset: 1

Views

Author

Zak Seidov, Jun 06 2021

Keywords

Examples

			41 = A001359(6) = A034961(5).
		

Crossrefs

Intersection of A001359 and A034961.

Programs

  • Mathematica
    Select[Plus @@@ Partition[Select[Range[7000], PrimeQ], 3, 1], And @@ PrimeQ[# + {0, 2}] &] (* Amiram Eldar, Jun 06 2021 *)

A359174 First of three consecutive primes p, q, r, such that the reverse of p+q+r is divisible by at least one of p, q and r.

Original entry on oeis.org

3, 7, 17, 53, 97, 193, 431, 1997, 5381, 30097, 128663, 278209, 385831, 481141, 1217509, 2401991, 2485831, 2625911, 3070037, 35912561, 39202231, 44531771, 45393841, 47084041, 50037011, 53639681, 54693481, 54949481, 55225217, 56094281, 56885351, 58632851, 59858651, 61030121, 62932621, 64195073, 64683491
Offset: 1

Views

Author

Robert Israel, Dec 27 2022

Keywords

Comments

Suggested in an email from J. M. Bergot.
It appears that in most cases, p+q+r = 3*q and is a palindrome. This occurs for 109 of the 122 terms < 5*10^9.

Examples

			a(3) = 17 is a term because 17, 19, 23 are consecutive primes with 17 + 19 + 23 = 59 and the reverse of 59 is 95 which is divisible by 19.
		

Crossrefs

Programs

  • Maple
    rev:= proc(n) local L,i;
    L:= convert(n,base,10);
    add(L[-i]*10^(i-1),i=1..nops(L))
    end proc:
    q:= 2: r:= 3:
    R:= NULL: count:= 0:
    while count < 50 do
      p:= q; q:= r; r:= nextprime(r);
      x:= rev(p+q+r);
      if x mod p = 0 or x mod q = 0 or x mod r = 0 then count:= count+1; R:= R,p;
      fi;
    od:
    R;
  • Mathematica
    q[tri_] := AnyTrue[tri, Divisible[IntegerReverse[Total[tri]], #] &]; Select[Partition[Prime[Range[250000]], 3, 1], q][[;; , 1]] (* Amiram Eldar, Dec 28 2022 *)
  • Python
    from sympy import nextprime
    from itertools import count, islice
    def agen(): # generator of terms
        p, q, r = 2, 3, 5
        while True:
            t = int(str(p+q+r)[::-1])
            if any(t%s == 0 for s in (p, q, r)): yield p
            p, q, r = q, r, nextprime(r)
    print(list(islice(agen(), 19))) # Michael S. Branicky, Dec 27 2022
Previous Showing 51-53 of 53 results.