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.

A234096 Integers of the form (p*q + 1)/2, where p and q are distinct primes.

Original entry on oeis.org

8, 11, 17, 18, 20, 26, 28, 29, 33, 35, 39, 43, 44, 46, 47, 48, 56, 58, 60, 62, 65, 67, 71, 72, 73, 78, 80, 81, 89, 92, 93, 94, 101, 102, 103, 105, 107, 108, 109, 110, 111, 118, 119, 124, 125, 127, 130, 133, 134, 144, 146, 148, 150, 151, 152, 153, 155, 160
Offset: 1

Views

Author

Clark Kimberling, Dec 27 2013

Keywords

Examples

			(3*5 + 1)/2 = 8, (3*7 + 1)/2 = 11.
		

Crossrefs

Programs

  • Mathematica
    t = Select[Range[1, 7000, 2], Map[Last, FactorInteger[#]] == Table[1, {2}] &]; Take[(t + 1)/2, 120] (* A234096 *)
    v = Flatten[Position[PrimeQ[(t + 1)/2], True]] ; w = Table[t[[v[[n]]]], {n, 1, Length[v]}]  (* A233562 *)
    (w + 1)/2 (* A234098 *)    (* Peter J. C. Moses, Dec 23 2013 *)

Formula

1 + A234093.

A233562 Products p*q of distinct primes such that (p*q + 1)/2 is a prime.

Original entry on oeis.org

21, 33, 57, 85, 93, 133, 141, 145, 177, 201, 205, 213, 217, 253, 301, 381, 393, 445, 453, 481, 501, 537, 553, 565, 633, 697, 717, 745, 793, 817, 865, 913, 921, 933, 973, 1041, 1081, 1137, 1141, 1261, 1285, 1293, 1317, 1345, 1401, 1417, 1437, 1465, 1477, 1501
Offset: 1

Views

Author

Clark Kimberling, Dec 14 2013

Keywords

Comments

This sequence is a subsequence of A128283 since the condition that (p+q)/2 be prime is not required here. The smallest number not in A128283 is 141=3*47 since (3+47)/2=25. - Hartmut F. W. Hoft, Oct 31 2020

Examples

			21 = 3*7 is the least product of distinct primes p and q for which (p*q + 1)/2 is a prime, so a(1) = 21.
		

Crossrefs

Programs

  • Mathematica
    t = Select[Range[1, 7000, 2], Map[Last, FactorInteger[#]] == Table[1, {2}] &]; Take[(t + 1)/2, 120] (* A234096 *)
    v = Flatten[Position[PrimeQ[(t + 1)/2], True]] ; w = Table[t[[v[[n]]]], {n, 1, Length[v]}]  (* A233562 *)
    (w + 1)/2 (* A234098 *)    (* Peter J. C. Moses, Dec 23 2013 *)
    With[{nn=50},Take[Union[Select[Times@@@Subsets[Prime[Range[2nn]],{2}], PrimeQ[ (#+1)/2]&]],nn]] (* Harvey P. Dale, Mar 24 2015 *)

A286257 Compound filter: a(n) = P(A046523(n), A046523(2n-1)), where P(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

1, 5, 5, 14, 12, 27, 5, 86, 14, 27, 23, 90, 12, 84, 27, 152, 23, 148, 5, 148, 27, 27, 80, 324, 25, 61, 44, 148, 23, 495, 5, 935, 61, 27, 61, 702, 5, 142, 61, 324, 138, 495, 23, 148, 90, 61, 23, 1426, 14, 265, 27, 90, 467, 324, 27, 430, 27, 61, 80, 2140, 12, 61, 183, 2144, 61, 495, 23, 607, 27, 495, 23, 2998, 23, 142, 90, 90, 142, 625, 5, 1426, 226, 27, 467
Offset: 1

Views

Author

Antti Karttunen, May 07 2017

Keywords

Crossrefs

Cf. A005382 (gives the positions of 5's), A067756 (of 12's), A234098 (of 23's).

Programs

  • PARI
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ This function from Charles R Greathouse IV, Aug 17 2011
    A286257(n) = (1/2)*(2 + ((A046523(n)+A046523((2*n)-1))^2) - A046523(n) - 3*A046523((2*n)-1));
    for(n=1, 10000, write("b286257.txt", n, " ", A286257(n)));
    
  • Python
    from sympy import factorint
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
    def P(n):
        f = factorint(n)
        return sorted([f[i] for i in f])
    def a046523(n):
        x=1
        while True:
            if P(n) == P(x): return x
            else: x+=1
    def a(n): return T(a046523(n), a046523(2*n - 1)) # Indranil Ghosh, May 07 2017
  • Scheme
    (define (A286257 n) (* (/ 1 2) (+ (expt (+ (A046523 n) (A046523 (+ -1 n n))) 2) (- (A046523 n)) (- (* 3 (A046523 (+ -1 n n)))) 2)))
    

Formula

a(n) = (1/2)*(2 + ((A046523(n)+A046523((2*n)-1))^2) - A046523(n) - 3*A046523((2*n)-1)).
a(n) = (1/2)*(2 + ((A046523(n)+A278223(n))^2) - A046523(n) - 3*A278223(n)).
Showing 1-3 of 3 results.