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 41-50 of 87 results. Next

A244146 Primes of the form x^2 + x*y + y^2 with x, y primes.

Original entry on oeis.org

19, 67, 79, 109, 163, 199, 349, 433, 457, 607, 691, 739, 937, 997, 1063, 1093, 1327, 1423, 1447, 1489, 1579, 1753, 1777, 1987, 2017, 2089, 2203, 2287, 2383, 2749, 3229, 3463, 3847, 3943, 4051, 4177, 4513, 4567, 5347, 5413, 5479, 5557, 5653, 6079, 6133, 6271, 6661
Offset: 1

Views

Author

Peter Luschny, Jun 21 2014

Keywords

Comments

Equally: primes that are of the form (p+q)^2 - p*q, with p, q primes. - Antti Karttunen, Jun 21 2014

Examples

			The terms 19, 67, 79 and 1777753 are in the sequence because they can be represented as:
19 = 2^2 + 2*3 + 3^2 = (2+3)^2 - 2*3.
67 = 2^2 + 2*7 + 7^2 = (2+7)^2 - 2*7.
79 = 3^2 + 3*7 + 7^2 = (3+7)^2 - 3*7.
1777753 = 677^2 + 677*859 + 859^2 = (677+859)^2 - 677*859.
		

Crossrefs

Subsequence of A007645.
Cf. A045331.

Programs

  • Mathematica
    Reap[For[p = 2, p < 10^4, p = NextPrime[p], If[Reduce[p == x^2 + x y + y^2, {x, y}, Primes] =!= False, Print[p]; Sow[p]]]][[2, 1]] (* Jean-François Alcover, Jul 12 2019 *)

A300332 Integers of the form Sum_{j in 0:p-1} x^j*y^(p-j-1) where x and y are positive integers with max(x, y) >= 2 and p is some prime.

Original entry on oeis.org

3, 4, 7, 12, 13, 19, 21, 27, 28, 31, 37, 39, 43, 48, 49, 52, 57, 61, 63, 67, 73, 75, 76, 79, 80, 84, 91, 93, 97, 103, 108, 109, 111, 112, 117, 121, 124, 127, 129, 133, 139, 147, 148, 151, 156, 157, 163, 169, 171, 172, 175, 181, 183, 189, 192, 193, 196, 199
Offset: 1

Views

Author

Peter Luschny, Mar 03 2018

Keywords

Comments

Equivalently these are the integers represented by a cyclotomic binary form Phi_p(x,y) where p is prime and x and y are positive integers with max(x,y) >= 2. A cyclotomic binary form (over Z) is a homogeneous polynomial in two variables of the form f(x, y) = y^phi(k)*Phi(k, x/y) where Phi(k, z) is a cyclotomic polynomial of index k and phi is Euler's totient function.
An efficient and safe calculation of this sequence requires a precise knowledge of the range of possible solutions of the associated Diophantine equations. The bounds used in the Julia program below were specified by Fouvry, Levesque and Waldschmidt.

Examples

			Let p denote an odd prime. Subsequences are numbers of the form
2^p - 1,         (A001348) (x = 1, y = 2) (Mersenne numbers),
p*2^(p - 1),     (A299795) (x = 2, y = 2),
(3^p - 1)/2,     (A003462) (x = 1, y = 3),
3^p - 2^p,       (A135171) (x = 2, y = 3),
p*3^(p - 1),     (A027471) (x = 3, y = 3),
(4^p - 1)/3,     (A002450) (x = 1, y = 4),
2^(p-1)*(2^p-1), (A006516) (x = 2, y = 4),
4^p - 3^p,       (A005061) (x = 3, y = 4),
p*4^(p - 1),     (A002697) (x = 4, y = 4),
(p^p-1)/(p-1),   (A023037),
p^p,             (A000312, A051674).
.
The generalized cuban primes A007645 are a subsequence, as are the quintan primes A002649, the septan primes and so on.
All primes in this sequence less than 1031 are generalized cuban primes. 1031 is an element because 1031 = f(5,2) where f(x,y) = x^4 + y*x^3 + y^2*x^2 + y^3*x + y^4, however 1031 is not a cuban prime because 1030 is not divisible by 6.
		

Crossrefs

Programs

  • Julia
    using Primes
    function isA300332(n)
        logn = log(n)^1.161
        K = Int(floor(5.383*logn))
        M = Int(floor(2*(n/3)^(1/2)))
        k = 2
        while k <= K
            if k == 7
                K = Int(floor(4.864*logn))
                M = Int(ceil(2*(n/11)^(1/4)))
            end
            for y in 2:M, x in 1:y
                r = x == y ? k*y^(k - 1) : div(x^k - y^k, x - y)
                n == r && return true
            end
            k = nextprime(k+1)
        end
        return false
    end
    A300332list(upto) = [n for n in 1:upto if isA300332(n)]
    println(A300332list(200))

A354092 Fully multiplicative prime shift where the primes of the form 3k+2 are replaced by the previous such prime (with 2 -> 1), and primes of the form 3k and 3k+1 stay as they are.

Original entry on oeis.org

1, 1, 3, 1, 2, 3, 7, 1, 9, 2, 5, 3, 13, 7, 6, 1, 11, 9, 19, 2, 21, 5, 17, 3, 4, 13, 27, 7, 23, 6, 31, 1, 15, 11, 14, 9, 37, 19, 39, 2, 29, 21, 43, 5, 18, 17, 41, 3, 49, 4, 33, 13, 47, 27, 10, 7, 57, 23, 53, 6, 61, 31, 63, 1, 26, 15, 67, 11, 51, 14, 59, 9, 73, 37, 12, 19, 35, 39, 79, 2, 81, 29, 71, 21, 22, 43, 69, 5, 83
Offset: 1

Views

Author

Antti Karttunen, May 17 2022

Keywords

Crossrefs

Left inverse of A354091.
Cf. A064989, A348747 (variants).

Programs

  • PARI
    A354092(n) = { my(f=factor(n)); for(k=1,#f~, if(2==(f[k,1]%3), if(2==f[k,1], f[k,1]--, forstep(i=primepi(f[k,1])-1,0,-1,if(2==(prime(i)%3), f[k,1]=prime(i); break))))); factorback(f); };

Formula

Fully multiplicative with a(2) = 1, a(A003627(1+n)) = A003627(n), a(A007645(n)) = A007645(n).
For all n >= 1, a(A354091(n)) = n.

A034934 Numbers k such that (3*k + 1)/2 is prime.

Original entry on oeis.org

1, 3, 7, 11, 15, 19, 27, 31, 35, 39, 47, 55, 59, 67, 71, 75, 87, 91, 99, 111, 115, 119, 127, 131, 151, 155, 159, 167, 171, 175, 179, 187, 195, 207, 211, 231, 235, 239, 255, 259, 267, 279, 287, 295, 299, 307, 311, 319, 327, 335, 339, 347, 371, 375, 379, 391
Offset: 1

Views

Author

Keywords

Comments

Related to hyperperfect numbers of a certain form.
The formula by Jaroslav Krizek is explained as follows: If p = (3n+1)/2 is prime, then it is an integer, and p must be of the form p = 3m-1, i.e., p = A003627(k). On the other hand, if p = A003627(k), then all k < p are coprime to p, so we have B(p) = (Sum_{kM. F. Hasler, Nov 29 2010

Examples

			a(6) = 19 because for A003627(6) = 29, B(29) = A053818(29)/A023896(29) = 7714/406 = 19. Cf. A179871-A179891, A003627, A007645. - _Jaroslav Krizek_, Aug 01 2010
		

Crossrefs

Programs

  • Magma
    [ n: n in [1..400 by 2] | IsPrime((3*n+1) div 2) ];
    
  • Mathematica
    Select[Range[500], PrimeQ[(3# + 1)/2] &] (* Harvey P. Dale, Jan 15 2011 *)
  • PARI
    is(n)=isprime((3*n+1)/2) \\ Charles R Greathouse IV, Feb 20 2017

Formula

a(n) = A175505(A003627(n)). - Jaroslav Krizek, Aug 01 2010

Extensions

Corrected by Vincenzo Librandi, Mar 24 2010

A139494 Primes of the form x^2 + 11x*y + y^2 for x and y nonnegative.

Original entry on oeis.org

13, 43, 61, 79, 103, 127, 139, 157, 181, 199, 211, 277, 283, 313, 337, 367, 373, 433, 439, 523, 547, 571, 601, 607, 673, 727, 751, 757, 823, 829, 859, 883, 907, 919, 937, 991, 997, 1039, 1063, 1069, 1093, 1117, 1153, 1171, 1213, 1231, 1249, 1291, 1297
Offset: 1

Views

Author

Artur Jasinski, Apr 24 2008

Keywords

Crossrefs

Programs

  • Mathematica
    a = {}; w = 11; k = 1; Do[Do[If[PrimeQ[n^2 + w*n*m + k*m^2], AppendTo[a, n^2 + w*n*m + k*m^2]], {n, m, 400}], {m, 1, 400}]; Union[a] (*Artur Jasinski*)

A139506 Primes of the form x^2 + 26x*y + y^2 for x and y nonnegative.

Original entry on oeis.org

193, 337, 457, 673, 1009, 1033, 1129, 1201, 1297, 1801, 1873, 2017, 2137, 2377, 2473, 2521, 2689, 2713, 2857, 3049, 3217, 3313, 3361, 3529, 3697, 3889, 4057, 4153, 4201, 4561, 4657, 4729, 4993, 5209, 5233, 5569, 5737, 5881, 6073, 6217, 6337, 6553, 6577
Offset: 1

Views

Author

Artur Jasinski, Apr 24 2008

Keywords

Comments

Also primes of the form x^2 + 168y^2. - T. D. Noe, Apr 29 2008
In base 12, the sequence is 141, 241, 321, 481, 701, 721, 7X1, 841, 901, 1061, 1101, 1201, 12X1, 1461, 1521, 1561, 1681, 16X1, 17X1, 1921, 1X41, 1E01, 1E41, 2061, 2181, 2301, 2421, 24X1, 2521, 2781, 2841, 28X1, 2X81, 3021, 3041, 3281, 33X1, 34X1, 3621, 3721, 3801, 3961, 3981, where X is 10 and E is 11. Moreover, the discriminant is 480. - Walter Kehowski, Jun 01 2008

Crossrefs

Programs

  • Mathematica
    a = {}; w = 26; k = 1; Do[Do[If[PrimeQ[n^2 + w*n*m + k*m^2], AppendTo[a, n^2 + w*n*m + k*m^2]], {n, m, 400}], {m, 1, 400}]; Union[a]

Formula

The primes are congruent to {1, 25, 121} (mod 168). - T. D. Noe, Apr 29 2008

A139512 Primes of the form x^2 + 32*x*y + y^2 for x and y nonnegative.

Original entry on oeis.org

229, 349, 409, 421, 661, 769, 829, 1021, 1069, 1249, 1381, 1429, 1549, 1789, 1801, 1861, 2089, 2161, 2269, 2389, 3001, 3061, 3109, 3181, 3229, 3469, 3889, 4021, 4129, 4201, 4441, 4861, 4909, 5101, 5449, 5521, 5869, 5881, 6121, 6469, 6481, 6529, 6781
Offset: 1

Views

Author

Artur Jasinski, Apr 24 2008

Keywords

Comments

Are all terms == 1 mod 12? - Zak Seidov, Apr 25 2008
Yes: (i) all terms == 1 mod 3 because the quadratic form has terms == {0,1} mod 3 and the values ==0 mod 3 are not primes. (ii) all terms == 1 mod 4 because the quadratic form has terms == {0,1,2} mod 4 and the values = {0,2} mod 4 are not primes. By the Chinese remainder constructions for coprime 3 and 4 all prime terms are == 1 mod 12. - R. J. Mathar, Jun 10 2020

Crossrefs

Programs

  • Mathematica
    a = {}; w = 32; k = 1; Do[Do[If[PrimeQ[n^2 + w*n*m + k*m^2], AppendTo[a, n^2 + w*n*m + k*m^2]], {n, m, 400}], {m, 1, 400}]; Union[a] (*Artur Jasinski*)

A171715 Absolute value of (n-th prime of form 3*m-1 minus n-th prime of form 3*k+1/2+-1/2).

Original entry on oeis.org

1, 2, 2, 2, 8, 8, 2, 14, 14, 14, 8, 14, 14, 8, 20, 26, 20, 20, 14, 14, 20, 20, 20, 26, 2, 8, 32, 26, 26, 44, 44, 50, 44, 38, 50, 26, 26, 38, 26, 32, 32, 20, 26, 20, 38, 38, 56, 62, 56, 68, 68, 80, 50, 50, 50, 44, 50, 62, 56, 50, 62, 74, 74, 62, 68, 56, 50, 44, 50, 50, 32, 44, 38
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Dec 17 2009, Feb 09 02 2010

Keywords

Comments

Also, the absolute value of (n-th generalized cuban prime minus n-th generalized non-cuban prime).
Or, the absolute value of n-th prime of form 6*m-3/2+-5/2 minus n-th prime of form 6*k-2+-1.

Examples

			a(1) = abs(3*1-1-(3*1+1/2-1/2)) = 1; a(2) = abs(3*2-1-(3*2+1/2+1/2)) = 2.
		

Crossrefs

Programs

  • Maple
    A003627 := proc(n) if n <= 2 then op(n,[2,5]) ; ; else for a from procname(n-1)+2 by 2 do if isprime(a) and (a mod 3) =2 then return a ; end if; end do: end if; end proc:
    A007645 := proc(n) if n <= 2 then op(n,[3,7]) ; ; else for a from procname(n-1)+2 by 2 do if isprime(a) and (a mod 3) <> 2 then return a ; end if; end do: end if; end proc:
    A171715 := proc(n) abs(A003627(n)-A007645(n)) ; end proc: # R. J. Mathar, Apr 24 2010
  • Mathematica
    Module[{nn=500,p1,p2,len},p1=Select[3*Range[nn]-1,PrimeQ];p2=Select[Flatten[#+{0,1}&/@ (3*Range[nn])],PrimeQ];len=Min[Length[p1],Length[p2]]; Abs[#[[1]]-#[[2]]]&/@ Thread[ {Take[p1,len],Take[p2,len]}]] (* Harvey P. Dale, Aug 29 2023 *)

Formula

a(n) = abs(A003627(n)-A007645(n)) = abs(A045375(n)-A045410(n)).

Extensions

Entries checked by R. J. Mathar, Apr 24 2010

A221717 Non-cuban primes.

Original entry on oeis.org

2, 3, 5, 11, 13, 17, 23, 29, 31, 41, 43, 47, 53, 59, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 277, 281, 283, 293
Offset: 1

Views

Author

N. J. A. Sloane, Jan 29 2013

Keywords

Comments

Primes not in A002407.

Crossrefs

Programs

  • Mathematica
    nn = 10; c = Select[Table[3 x^2 + 3 x + 1, {x, nn}], PrimeQ[#] &]; Complement[Prime[Range[PrimePi[c[[-1]]]]], c] (* T. D. Noe, Jan 30 2013 *)

A139505 Primes of the form x^2 + 25x*y + y^2 for x and y nonnegative.

Original entry on oeis.org

151, 163, 307, 397, 409, 541, 547, 601, 673, 811, 823, 859, 967, 997, 1153, 1231, 1237, 1327, 1567, 1669, 1741, 1879, 2083, 2143, 2281, 2293, 2557, 2677, 2707, 2833, 2971, 3037, 3259, 3313, 3433, 3877, 4003, 4129, 4153, 4603, 4639, 4861, 4957, 5101, 5227
Offset: 1

Views

Author

Artur Jasinski, Apr 24 2008

Keywords

Crossrefs

Programs

  • Mathematica
    a = {}; w = 25; k = 1; Do[Do[If[PrimeQ[n^2 + w*n*m + k*m^2], AppendTo[a, n^2 + w*n*m + k*m^2]], {n, m, 400}], {m, 1, 400}]; Union[a] (*Artur Jasinski*)
    With[{nn=80},Select[Union[#[[1]]^2+25#[[1]]#[[2]]+#[[2]]^2&/@Tuples[ Range[ 0,nn],2]],PrimeQ[#]&&#Harvey P. Dale, Feb 10 2020 *)
Previous Showing 41-50 of 87 results. Next