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 21-30 of 40 results. Next

A232878 Twin prime pairs which sum to perfect squares.

Original entry on oeis.org

17, 19, 71, 73, 881, 883, 1151, 1153, 2591, 2593, 3527, 3529, 4049, 4051, 15137, 15139, 20807, 20809, 34847, 34849, 46817, 46819, 69191, 69193, 83231, 83233, 103967, 103969, 112337, 112339, 149057, 149059, 176417, 176419, 179999, 180001, 206081, 206083
Offset: 1

Views

Author

Gary Croft, Dec 01 2013

Keywords

Comments

All square roots of twin prime sums in this sequence (see A152786) are multiples of 6.
Digital roots of all pairs in this sequence are {8,1}.
Twin primes of the form 18n^2 +- 1. - Charles R Greathouse IV, Aug 26 2014

Examples

			17+19 = 36, square root of 36 = 6; 71+73 = 144, square root of 144 = 12.
		

Crossrefs

Programs

  • Mathematica
    t = {}; Do[ps = {2 n^2 - 1, 2 n^2 + 1}; If[PrimeQ[ps[[1]]] && PrimeQ[ps[[2]]], AppendTo[t, ps]], {n, 1000}]; Flatten[t] (* T. D. Noe, Dec 03 2013 *)
  • PARI
    for(n=1,1e3, if(isprime(t=18*n^2-1) && isprime(t+2), print1(t", "t+2", "))) \\ Charles R Greathouse IV, Aug 26 2014

Formula

a(2*n) = a(2*n-1) + 2, a(2*n+1) = A069496(n).

A195336 Smallest number k such that k^n is the sum of numbers in a twin prime pair.

Original entry on oeis.org

8, 6, 2, 150, 96, 324, 6, 1518, 174, 168, 21384, 18, 20754, 2988, 2424, 8196, 3786, 14952, 34056, 48, 1620, 8256, 31344, 1176, 123360, 147456, 28650, 132, 90, 12834, 81126, 11790, 2340, 9702, 11496, 33000, 10716, 66954, 6816, 234, 109956, 3012, 6744, 117654, 19950, 26550, 8226, 40584, 23640, 30660
Offset: 1

Views

Author

Kausthub Gudipati, Sep 16 2011

Keywords

Comments

Schinzel's hypothesis H implies that a(n) exists for every n. [Charles R Greathouse IV, Sep 18 2011]

Crossrefs

Cf. A054735.

Programs

  • Maple
    isA054735 := proc(n)
            if type(n,'odd') then
                    false;
            else
                    isprime(n/2-1) and isprime(n/2+1) ;
            end if;
    end proc:
    A195336 := proc(n)
            for k from 1 do
                    if isA054735(k^n) then
                            return k;
                    end if;
            end do:
    end proc:
    for n from 1  do print(A195336(n)) ; end do: # R. J. Mathar, Sep 20 2011
  • PARI
    a(n)=my(k=2);while(!ispseudoprime(k^n/2-1)||!ispseudoprime(k^n/2+1),k+=2);k \\ Charles R Greathouse IV, Sep 18 2011
    
  • Python
    from sympy import isprime
    def cond(k, n): m = (k**n)//2; return isprime(m-1) and isprime(m+1)
    def a(n):
        k = 2
        while not cond(k, n): k += 2
        return k
    print([a(n) for n in range(1, 25)]) # Michael S. Branicky, Aug 06 2021

Formula

a(n) is the least k such that (1/2)*k^n - 1 and (1/2)*k^n + 1 are prime.

Extensions

a(11)-a(50) from Charles R Greathouse IV, Sep 18 2011

A037076 Palindromes which are the sum of a twin prime pair.

Original entry on oeis.org

8, 696, 4224, 6336, 42024, 44544, 61116, 67176, 69696, 405504, 423324, 480084, 4050504, 4075704, 4078704, 4258524, 4435344, 4607064, 4656564, 4809084, 4844484, 4863684, 4869684, 4885884, 6161616, 6175716, 6371736, 6527256
Offset: 1

Views

Author

Keywords

Examples

			8 is a term since it is a palindrome and the sum of the twin primes (3, 5).
		

Crossrefs

Intersection of A002113 and A054735.

Programs

  • Mathematica
    Select[2*Range[250000], PalindromeQ[#] && And @@ PrimeQ[#/2 + {-1, 1}] &] (* Amiram Eldar, Dec 27 2019 *)

Extensions

More terms from Carlos Rivera

A082496 Numbers of the form 2p+1, where p and p+2 are a pair of twin primes.

Original entry on oeis.org

7, 11, 23, 35, 59, 83, 119, 143, 203, 215, 275, 299, 359, 383, 395, 455, 479, 539, 563, 623, 695, 839, 863, 923, 1043, 1139, 1199, 1235, 1283, 1319, 1619, 1643, 1655, 1715, 1763, 2039, 2063, 2099, 2123, 2183, 2303, 2459, 2555, 2579, 2603, 2639, 2855, 2903
Offset: 1

Views

Author

Vincenzo Origlio (vincenzo.origlio(AT)itc.cnr.it), Apr 29 2003

Keywords

Crossrefs

Equals A054735 - 1.

Programs

  • Mathematica
    2Select[ Prime/@Range[ 250 ], PrimeQ[ #+2 ]& ]+1

Formula

a(n) = 2*A001359(n) + 1 = 2*A006512(n) - 3 = A001359(n) + A006512(n) - 1

Extensions

Edited by Dean Hickerson, Jun 20 2003

A226599 Numbers which are the sum of two squared primes in exactly four ways (ignoring order).

Original entry on oeis.org

10370, 10730, 11570, 12410, 13130, 19610, 22490, 25010, 31610, 38090, 38930, 39338, 39962, 40970, 41810, 55250, 55970, 59330, 59930, 69530, 70850, 73730, 76850, 77090, 89570, 98090, 98930, 103298, 118898, 125450, 126290, 130730, 135218, 139490
Offset: 1

Views

Author

Henk Koppelaar, Jun 13 2013

Keywords

Comments

It appears that all first differences are divisible by 24. - Zak Seidov, Jun 14 2013

Examples

			10370 = 13^2 + 101^2 = 31^2 + 97^2 = 59^2 + 83^2 = 71^2 + 73^2.
10730 = 11^2 + 103^2 = 23^2 + 101^2 = 53^2 + 89^2 = 67^2 + 79^2.
		

References

  • Stan Wagon, Mathematica in Action, Springer, 2000 (2nd ed.), Ch. 17.5, pp. 375-378.

Crossrefs

Cf. A054735 (restricted to twin primes), A037073, A069496.
Cf. A045636 (sum of two squared primes is a superset).
Cf. A214511 (least number having n representations).
Cf. A225104 (numbers having at least three representations is a superset).
Cf. A226539, A226562 (sums decomposed in exactly two and three ways).

Programs

  • Maple
    Prime2PairsSum := s -> select(x ->`if`(andmap(isprime, x), true, false),
       numtheory:-sum2sqr(s)):
    for n from 2 to 10^6 do
      if nops(Prime2PairsSum(n)) = 4 then print(n, Prime2PairsSum(n)) fi;
    od;
  • Mathematica
    (* Assuming mod(a(n),24) = 2 *) Reap[ For[ k = 2, k <= 2 + 240000, k = k + 24, pr = Select[ PowersRepresentations[k, 2, 2], PrimeQ[#[[1]]] && PrimeQ[#[[2]]] &]; If[Length[pr] == 4 , Print[k]; Sow[k]]]][[2, 1]] (* Jean-François Alcover, Jun 14 2013 *)

Formula

a(n) = p^2 + q^2; p, q are (not necessarily different) primes

A239309 a(n) is the smallest k such that prime(n) divides Sum_{i=1..k} A086169(i), or 0 if no such k exists, where A086169(i) is the sum of the first i twin prime pairs.

Original entry on oeis.org

1, 0, 2, 5, 3, 37, 21, 29, 67, 71, 23, 11, 15, 7, 58, 12, 41, 8, 66, 25, 35, 370, 35, 17, 75, 159, 198, 30, 37, 153, 232, 333, 170, 507, 108, 279, 41, 61, 486, 9, 194, 211, 29, 73, 173, 575, 152, 214, 10, 147, 126, 672, 388, 77, 358, 1048, 528, 291, 322, 1491
Offset: 1

Views

Author

Michel Lagneau, Mar 15 2014

Keywords

Comments

a(2) = 0. Proof
It is easy to see that A054735(1)= 8 ==2 (mod 3) and A054735(n)==0 mod 3 for n > 1 where A054735 is the sum of twin pairs. Hence A086169(n)==2 (mod 3) and the prime 3 is never a divisor of A086169(n).

Examples

			a(1)=1 because A086169(1)=(3+5)=8 and prime(1)= 2 divides 8;
a(2)=0 because prime(2)=3 is never a divisor of A086169(n);
a(3)=2 because A086169(2)=(3+5)+(5+7)=20 and prime(3)= 5 divides 20.
		

Crossrefs

Programs

  • Mathematica
    Transpose[With[{aprs=Thread[{Range[5000],Accumulate[Select[Table[Prime[n]+1,{n,45900}],PrimeQ[#+1]&]*2]}]},Flatten[Table[Select[aprs,Divisible[Last[#],Prime[m]]&,1],{m,1,60}],1]]][[1]]

A243914 Even numbers which are twice the sum of a twin prime pair, but cannot be expressed as the sum of 2 distinct twin prime pairs.

Original entry on oeis.org

16, 24, 792, 1392
Offset: 1

Views

Author

Lear Young, Jun 14 2014

Keywords

Comments

Subsequence of A111046 (twice A054735).
It seems that this sequence is probably finite (there are no further terms below 10^7).

Examples

			a(1) = 16 = 2*(3+5).
16 is in the sequence since it is twice the sum of twin primes 3 and 5, but cannot be expressed as the sum of 2 distinct twin pairs.
36 is not in the sequence because although it is the sum of twin primes 17 and 19, it can also be expressed as the sum of pairs (5, 7) and (11, 13).
		

Crossrefs

Programs

  • Maple
    with(SignalProcessing): # requires at least Maple 17
    N:= 10^6; # to check primes up to N
    Primes:= select(isprime,{seq(2*i+1,i=1..N)}):
    Twins:= Primes intersect map(t-> t-2,Primes):
    nT:= nops(Twins);
    T:= Array(1..(Twins[nT]+1)/2, datatype=float[8]);
    for i from 1 to nT do T[(Twins[i]+1)/2]:= 1 od:
    TTwins:= Convolution(T,T);
    map(t -> 4*(t+1), select(n -> round(TTwins[n])=1,[$1..(nT+1)/2])); # Robert Israel, Jun 15 2014
  • PARI
    isok(isum1, vsum2) = {for (k=1, #vsum2, ksum2 = vsum2[k]; if (ksum2 > one, break;); if (isum1 - ksum2 != ksum2, if (vecsearch(vsum2, isum1 - ksum2), return (0)););); return (1);}
    lista() = {v = readvec("b014574.txt"); vsum1 = 4*v; vsum2 = 2*v; maxs2 = vecmax(vsum2); for (i=1, #v, isum1 = vsum1[i]; if (isum1 < maxs2, if (isok(isum1, vsum2), print1(isum1, ", "));););} \\ Michel Marcus, Jun 15 2014
    
  • PARI
    l1=l2=List();a=select(p->isprime(p+2),primes(1000));for(i=1,#a-1,if(i<#a/4,listput(l1,4*a[i]+4));for(j=i+1,#a,listput(l2,2*(a[i]+a[j])+4)));print(setminus(Set(l1),Set(l2))) \\ Lear Young, Jun 15 2014

A261889 Primes that are the square of the sum of a twin prime pair plus 1.

Original entry on oeis.org

577, 1297, 7057, 14401, 41617, 90001, 147457, 156817, 484417, 746497, 1299601, 1742401, 2702737, 2944657, 4260097, 5308417, 6051601, 6780817, 8785297, 10497601, 14107537, 15210001, 16451137, 17438977, 18147601, 29419777, 38937601, 45968401, 51322897, 56791297
Offset: 1

Views

Author

K. D. Bajpai, Sep 05 2015

Keywords

Comments

Alternatively: Primes of the form (p + q)^2 + 1 where p and q are twin primes.
All the terms are congruent to 1 (mod 3).

Examples

			577 appears in the sequence because it is a prime resulting from twin prime pair (11,13): (11 + 13)^2 + 1 = 577.
7057 appears in the sequence because it is a prime resulting from twin prime pair (41,43): (41 + 43)^2 + 1 = 7057.
		

Crossrefs

Programs

  • Magma
    [k : p in PrimesUpTo (10000) | IsPrime(p+2) and IsPrime(k) where k is ((p + p + 2)^2 + 1)];
  • Maple
    A261889:= proc() local a, b, d; a:= ithprime(n); b:=a+2; d:=(a+b)^2+1; if isprime(b)and isprime(d) then return (d): fi; end: seq(A261889 (), n=1..10000);
  • Mathematica
    A261889 = {}; Do[p1 = Prime[n]; p2 = p1 + 2; p = (p1 + p2)^2 + 1; If[PrimeQ[p2] &&  PrimeQ[p], AppendTo[A261889, p]], {n, 1, 10000}]; A261889
  • PARI
    forprime(p = 1,10000, if(isprime(p+2) && isprime((p + p + 2)^2 + 1), print1(( (p + p + 2)^2 + 1), ", ")));
    
  • PARI
    list(lim)=my(v=List(),t,p=2); forprime(q=3,sqrtint(lim\1-1)\2+1, if(q-p==2 && isprime(t=(p+q)^2+1), listput(v,t)); p=q); Vec(v) \\ Charles R Greathouse IV, Sep 06 2015
    

A269662 Semiprimes which are the sum of a twin prime pair plus one.

Original entry on oeis.org

9, 25, 85, 121, 145, 205, 217, 301, 361, 481, 565, 697, 841, 865, 1141, 1285, 1717, 1765, 2041, 2101, 2305, 2461, 2581, 2605, 2641, 2965, 2977, 3241, 3337, 3397, 3865, 3901, 3997, 4285, 4537, 4681, 4765, 5317, 5377, 5461, 5941, 6001, 6241, 6505, 6937, 7081, 7117
Offset: 1

Views

Author

K. D. Bajpai, Mar 02 2016

Keywords

Comments

All the terms, except a(1), are congruent to 1 (mod 3).

Examples

			a(2) = 25 = 5 * 5 that is semiprime. Also, 25 = 11 + 13 + 1 where {11, 13} is a twin prime pair.
a(3) = 85 = 5 * 17 that is semiprime. Also, 55 = 41 + 43 + 1 where {41, 43} is a twin prime pair.
		

Crossrefs

Programs

  • Magma
    IsP2:=func< n | &+[k[2]: k in Factorization(n)] eq 2 >; [ s: n in [1..1000] | IsPrime(n) and IsPrime(n+2) and IsP2(s) where s is (n + n+2 + 1)];
  • Mathematica
    A269662 = {}; Do[a = Prime[n]; b = a + 2; c = a + b + 1; If[PrimeQ[b] && PrimeOmega[c] == 2, AppendTo[A269662, c]], {n, 1000}]; A269662
    Select[Range[1, 7200, 2], And[PrimeOmega@ # == 2, And[PrimeQ@ #, NextPrime[#] - 2] == # &[(# - 1)/2 - 1]] &] (* Michael De Vlieger, Apr 01 2016 *)
    Select[1+Total[#]&/@Select[Partition[Prime[Range[500]],2,1],#[[2]]-#[[1]] == 2&],PrimeOmega[#]==2&] (* Harvey P. Dale, Apr 10 2016 *)
  • PARI
    for(n = 1, 1000, p=prime(n); q=p+2; s=p+q+1; if(isprime(q) && bigomega(s)==2, print1(s,", ")));
    

A270244 Lesser of twin primes such that the sum of the twin prime pair is the sum of 2 positive cubes.

Original entry on oeis.org

1871, 8819, 74609, 77237, 81647, 93131, 98927, 102059, 108107, 110501, 152837, 180287, 220859, 241919, 256031, 275939, 309851, 319679, 422099, 457001, 459647, 462419, 490247, 530711, 568151, 635291, 660851, 667547, 721619, 729269, 761669, 843677, 859679, 909971, 948401, 1037087, 1041119
Offset: 1

Views

Author

Altug Alkan, Mar 13 2016

Keywords

Examples

			1871 is a term because 1871 + 1873 = 10^3 + 14^3.
8819 is a term because 8819 + 8821 = 4^3 + 26^3.
74609 is a term because 74609 + 74611 = 7^3 + 53^3.
		

Crossrefs

Programs

  • Mathematica
    Select[Select[Prime@ Range[10^5], PrimeQ[# + 2] &], Length[PowersRepresentations[2 # + 2, 2, 3] /. {0, } -> Nothing] > 0 &] (* _Michael De Vlieger, Mar 15 2016 *)
  • PARI
    isA003325(n) = for(k=1, sqrtnint(n\2, 3), ispower(n-k^3, 3) && return(1));
    t(n,p=3) = {while( p+2 < (p=nextprime( p+1 )) || n-->0, ); p-2}
    for(n=1, 1e4, if(isA003325(2*t(n)+2), print1(t(n), ", ")));
Previous Showing 21-30 of 40 results. Next