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 11-12 of 12 results.

A382509 Integers s = (p1+p2)/4 such that p1 and p2 are consecutive primes and s can be written in the form p*2^k with k>=0 and p>2 prime.

Original entry on oeis.org

3, 6, 13, 17, 28, 38, 43, 67, 80, 88, 96, 118, 127, 137, 167, 178, 188, 193, 218, 223, 272, 283, 298, 302, 328, 368, 472, 487, 508, 563, 592, 613, 617, 634, 643, 647, 662, 718, 773, 778, 802, 808, 872, 878, 932, 1033, 1142, 1168, 1172, 1187, 1193, 1198, 1256, 1277
Offset: 1

Views

Author

Keywords

Examples

			For n = 2: a(n) = 6 because 4 * 6 = 24 and 24 is the sum of the two consecutive primes 11 and 13 and the factorization of 6 is 3 * 2^1.
		

Crossrefs

Programs

  • Mathematica
    Select[Plus @@@ Partition[Prime[Range[400]], 2, 1]/4, IntegerQ[#] && PrimeQ[#/2^IntegerExponent[#, 2]] &] (* Amiram Eldar, Apr 21 2025 *)
  • PARI
    is(n) = my(v=valuation(n, 2), n2);if(!isprime(n>>v), return(0)); n2 = 2*n; n2 - precprime(n2) == nextprime(n2) - n2 \\ David A. Corneth, Apr 21 2025
  • Python
    from sympy import isprime, sieve as prime
    A382509 = []
    for x in range(2,1000):
        if (totest := (prime[x] + prime[x+1])) % 4 == 0:
            s = totest // 4
            while totest % 2 == 0: totest //= 2
            if isprime(totest): A382509.append(s)
    print(A382509)
    

A163488 Primes p such that 5*p is a sum of 3 consecutive primes.

Original entry on oeis.org

2, 3, 47, 79, 113, 197, 227, 257, 263, 317, 347, 383, 431, 443, 491, 499, 541, 557, 617, 757, 811, 887, 929, 977, 1021, 1087, 1093, 1129, 1231, 1237, 1433, 1511, 2111, 2129, 2213, 2347, 2543, 2551, 2609, 2657, 2671, 2803, 2837, 2999, 3011, 3049, 3119, 3187
Offset: 1

Views

Author

Keywords

Comments

Primes of the form A034961(k)/5, associated with k=1, 2, 21, 31, 42, 66,... - R. J. Mathar, Aug 02 2009

Examples

			p=2 is in the sequence because 2*5=10=2+3+5.
p=3 is in the sequence because 3*5=15=3+5+7.
		

Crossrefs

Programs

  • Mathematica
    lst={};Do[If[PrimeQ[p=(Prime[n]+Prime[n+1]+Prime[n+2])/5],AppendTo[lst, p]],{n,7!}];lst
    cp3Q[n_]:=Module[{mid=Floor[PrimePi[(5n)/3]],tst},tst=Total/@ Partition[ Prime[ Range[mid-10,mid+10]],3,1];MemberQ[tst,5n]]; Select[ Prime[ Range[ 500]],cp3Q]//Quiet (* Harvey P. Dale, Jan 02 2018 *)

Extensions

Entries checked by R. J. Mathar, Aug 02 2009
Previous Showing 11-12 of 12 results.