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

A122430 Primes of the form 1+2*n+3*n^2.

Original entry on oeis.org

17, 457, 617, 1009, 1777, 2081, 3137, 4409, 5897, 9521, 11657, 14009, 24481, 25577, 29009, 39217, 43441, 47881, 49409, 62497, 67801, 75209, 81017, 85009, 87041, 93281, 97561, 104161, 110977, 120401, 132721, 135257, 140401, 159161, 182041
Offset: 1

Views

Author

Zak Seidov, Oct 20 2006

Keywords

Comments

3*a(n)-2 is a square (of the form (3*k+1)^2). - Vincenzo Librandi, Mar 15 2013
Also primes which are the sum of 2 consecutive pentagonal numbers (A000326). - Vicente Izquierdo Gomez, Aug 13 2017

Crossrefs

Cf. A086285 (numbers n such that 1+2n+3n^2 is prime).
Subsequence of A056109.

Programs

  • Magma
    [a: n in [1..300] | IsPrime(a) where a is 1+2*n+3*n^2]; // Vincenzo Librandi, Mar 15 2013
    
  • Mathematica
    Select[Table[1 + 2 n + 3 n^2, {n, 500}], PrimeQ] (* Vincenzo Librandi, Mar 15 2013 *)
  • PARI
    is(n)=isprime(n) && issquare(3*n-2,&n) && n%3==1 \\ Charles R Greathouse IV, Sep 23 2013

A122513 Numbers n such that 1+2n+3n^2 is a triangular number.

Original entry on oeis.org

0, 1, 46, 135, 4540, 13261, 444906, 1299475, 43596280, 127335321, 4271990566, 12477562015, 418611479220, 1222673742181, 41019652973026, 119809549171755, 4019507379877360, 11740113145089841, 393870703575008286, 1150411278669632695, 38595309442970934700
Offset: 1

Views

Author

Zak Seidov, Oct 20 2006

Keywords

Comments

The y solution to the generalized Pell equation x^2 + x = 2 + 4*y + 6*y^2. - T. D. Noe, Apr 28 2011
Also numbers n such that the sum of the pentagonal numbers P(n) and P(n+1) is equal to a hexagonal number. - Colin Barker, Dec 15 2014
Also numbers n such that the sum of the pentagonal numbers P(n) and P(n+1) is equal to a triangular number. - Colin Barker, Dec 15 2014

Examples

			Corresponding values of triangular numbers tri = m(m+1)/2 and m's are
tri = 1, 6, 6441, 54946, 61843881, 527588886, 593824936321
m = 1, 3, 113, 331, 11121, 32483, 1089793.
		

Crossrefs

Cf. A000217 (triangular numbers), A086285 (numbers n such that 1+2n+3n^2 is prime).

Programs

  • Maple
    ivs:=[0,1,46,135,4540]:
    rec:= a(n) = a(n-1)+98*a(n-2)-98*a(n-3)-a(n-4)+a(n-5):
    f:= gfun:-rectoproc({rec, seq(a(i)=ivs[i],i=1..5)},a(n),remember):
    seq(f(n),n=1..100); # Robert Israel, Dec 15 2014
  • Mathematica
    triQ[n_] := IntegerQ[ Sqrt[8n + 1]]; lst = {}; Do[ If[ triQ[1 + 2n + 3n^2], AppendTo[lst, n]; Print@n], {n, 0, 65000000}] (* Robert G. Wilson v, Jan 08 2007 *)
    LinearRecurrence[{1, 98, -98, -1, 1}, {1, 46, 135, 4540, 13261}, 30] (* T. D. Noe, Apr 28 2011 *)
  • PARI
    concat(0, Vec(x^2*(5*x^3+9*x^2-45*x-1)/((x-1)*(x^2-10*x+1)*(x^2+10*x+1)) + O(x^100))) \\ Colin Barker, Dec 15 2014

Formula

a(n) = a(n-1)+98*a(n-2)-98*a(n-3)-a(n-4)+a(n-5). - Colin Barker, Dec 15 2014
G.f.: x^2*(5*x^3+9*x^2-45*x-1) / ((x-1)*(x^2-10*x+1)*(x^2+10*x+1)). - Colin Barker, Dec 15 2014
a(n) = (-(5/8)*sqrt(6)-3/2)*(5-2*sqrt(6))^n+(-3/2+(5/8)*sqrt(6))*(5+2*sqrt(6))^n-1/3+(-(1/3)*sqrt(6)-5/6)*(-5+2*sqrt(6))^n+((1/3)*sqrt(6)-5/6)*(-5-2*sqrt(6))^n. - Robert Israel, Dec 15 2014

Extensions

a(8) and a(9) from Robert G. Wilson v, Jan 08 2007
a(10) and a(11) from Donovan Johnson, Apr 28 2011
Extended by T. D. Noe, Apr 28 2011

A122488 Numbers k such that 1 + 2k + 3k^2 is semiprime.

Original entry on oeis.org

1, 3, 4, 5, 6, 8, 9, 10, 11, 15, 20, 21, 22, 29, 30, 33, 35, 36, 40, 42, 45, 47, 48, 50, 54, 57, 59, 60, 64, 66, 69, 72, 75, 76, 77, 78, 80, 81, 82, 84, 86, 89, 95, 96, 100, 102, 108, 110, 111, 112, 113, 116, 123, 125, 130, 131, 132, 134, 136, 143, 146, 147, 148, 152, 153
Offset: 1

Views

Author

Zak Seidov, Oct 20 2006

Keywords

Examples

			k=3 is a term because 1 + 2k + 3k^2 = 34 = 2*17 (semiprime);
k=4 is a term because 1 + 2k + 3k^2 = 57 = 3*19 (semiprime); etc.
		

Crossrefs

Cf. A086285 (numbers k such that 1 + 2k + 3k^2 is prime).

Programs

  • Maple
    filter:= n -> numtheory:-bigomega(1+2*n+3*n^2)=2:
    select(filter, [$1..200]); # Robert Israel, Nov 03 2022
  • Mathematica
    Select[Range[160],PrimeOmega[1+2#+3#^2]==2&] (* Harvey P. Dale, Aug 22 2011 *)

A240878 Numbers n such that (n^2 + 2)/3 is prime.

Original entry on oeis.org

2, 7, 11, 17, 29, 35, 37, 43, 53, 55, 65, 73, 79, 83, 97, 115, 119, 125, 133, 137, 155, 161, 169, 187, 191, 205, 209, 233, 251, 263, 269, 271, 277, 281, 287, 295, 335, 343, 359, 361, 379, 385, 389, 395, 407, 413, 425, 433, 451, 461, 475, 479, 493, 505, 511, 521, 529, 541, 559, 577
Offset: 1

Views

Author

Robert Israel, Apr 13 2014

Keywords

Comments

If n == 1 mod 3, then (n - 1)/3 is in A086285.

Examples

			(2^2 + 2)/3 = 6/3 = 2, which is prime, so 2 is in the sequence.
(7^2 + 2)/3 = 51/3 = 17, which is prime, so 7 is in the sequence.
(11^2 + 2)/3 = 123/3 = 41, which is prime, so 11 is in the sequence.
(13^2 + 2)/3 = 171/3 = 57 = 3 * 19, which is not prime, so 13 is not in the sequence.
		

Crossrefs

Cf. A086285.

Programs

  • Magma
    [2] cat [n: n in [4..600] | IsPrime((n^2 + 2) div 3)]; // Vincenzo Librandi, Jul 01 2014
    
  • Maple
    N:= 10000; # to get all terms <= 3 N + 2
    A240878:= select(t -> isprime((t^2+2)/3),{seq(seq(3*i+j,j=1..2),i=0..N)}):
  • Mathematica
    Select[Range[500], PrimeQ[(#^2 + 2)/3] &] (* Alonso del Arte, Apr 13 2014 *)
  • PARI
    is(n)=isprime((n^2+2)/3) \\ Charles R Greathouse IV, Jun 06 2017

A122482 Primes p such that 1 + 4p + 12p^2 is prime.

Original entry on oeis.org

7, 13, 19, 31, 79, 127, 139, 181, 199, 241, 271, 313, 337, 349, 373, 457, 523, 577, 643, 691, 727, 769, 787, 823, 907, 991, 1051, 1129, 1231, 1447, 1567, 1627, 1723, 1759, 1783, 1861, 1879, 1987, 1993, 2053, 2251, 2287, 2371, 2437, 2473, 2539, 2593, 2659
Offset: 1

Views

Author

Zak Seidov, Oct 20 2006

Keywords

Comments

Primes p such that 2*p is in A086285 (Numbers n such that 1+2n+3n^2 is prime).

Crossrefs

Cf. A086285.

Programs

  • Magma
    [ p: p in PrimesUpTo(5000) | IsPrime(1+4*p+12*p^2)] // Vincenzo Librandi, Jan 26 2011
  • Mathematica
    Select[Prime[Range[400]],PrimeQ[1+4#+12#^2]&] (* Harvey P. Dale, Mar 11 2022 *)

A122492 Semiprimes k such that 1 + 2k + 3k^2 is also semiprime.

Original entry on oeis.org

4, 6, 9, 10, 15, 21, 22, 33, 35, 57, 69, 77, 82, 86, 95, 111, 123, 134, 143, 146, 161, 183, 202, 203, 209, 218, 219, 221, 249, 262, 267, 298, 299, 302, 314, 321, 323, 326, 329, 334, 335, 339, 341, 417, 422, 446, 454, 471, 489, 515, 543, 551, 554, 562, 566, 573
Offset: 1

Views

Author

Zak Seidov, Oct 20 2006

Keywords

Examples

			k = 4 = 2*2 (semiprime) is a term because 1 + 2k + 3k^2 = 57 = 3*19 (semiprime), etc.
		

Crossrefs

Cf. A086285 (numbers k such that 1 + 2k + 3k^2 is prime).

Programs

  • Magma
    IsSemiprime:=func< n | &+[ k[2]: k in Factorization(n) ] eq 2 >; [ n: n in [2..600] | IsSemiprime(n) and IsSemiprime(1+2*n+3*n^2)]; // Vincenzo Librandi, Jan 09 2019
  • Mathematica
    Select[Range[600],PrimeOmega[#]==PrimeOmega[1+2#+3#^2]==2&] (* Harvey P. Dale, Nov 04 2023 *)

A358205 a(n) is the least number k such that 1 + 2*k + 3*k^2 has exactly n prime divisors, counted with multiplicity.

Original entry on oeis.org

0, 2, 1, 13, 19, 7, 61, 331, 169, 1141, 6487, 898, 20581, 315826, 59947, 296143, 1890466, 6141994, 1359025, 49188715, 20490901, 264422320, 178328878, 1340590345, 9476420614, 5989636213, 72238539832, 103619599441, 668478672403, 794002910839, 417430195531
Offset: 0

Views

Author

Robert Israel, Nov 03 2022

Keywords

Comments

a(n) is the least k such that A001222(A056109(k)) = n.

Examples

			a(5) = 7 because 1 + 2*7 + 3*7^2 = 162 = 2*3^4 has 5 prime divisors, counted with multiplicity.
From _Jon E. Schoenfield_, Nov 05 2022: (Start)
Let m = 1 + 2*k + 3*k^2. Since no such number m is divisible by 2^2, 5, or 7, the smallest number m having a given number of prime factors counted with multiplicity will tend to have a large number of 3's among its prime factors:
.
   n    k = a(n)                     m = 1 + 2*k + 3*k^2
  --  ------------  -----------------------------------------------------
   0             0                          1
   1             2                         17 (prime)
   2             1                          6 = 2 * 3
   3            13                        534 = 2 * 3    * 89
   4            19                       1122 = 2 * 3    * 11 * 17
   5             7                        162 = 2 * 3^4
   6            61                      11286 = 2 * 3^3  * 11 * 19
   7           331                     329346 = 2 * 3^4  * 19 * 107
   8           169                      86022 = 2 * 3^6  * 59
   9          1141                    3907926 = 2 * 3^5  * 11 * 17 * 43
  10          6487                  126256482 = 2 * 3^5  * 11^2 * 19 * 113
  11           898                    2421009 =     3^10 * 41
  12         20581                 1270773846 = 2 * 3^9  * 19 * 1699
  13        315826               299238818481 =     3^9  * 19 * 73 * ...
  14         59947                10781048322 = 2 * 3^10 * 11 * 43 * 193
  15        296143               263102621634 = 2 * 3^12 * 17 * 14561
  16       1890466             10721588872401 =     3^12 * 11 * 19 * ...
  17       6141994            113172283172097 =     3^16 * 2629057
  18       1359025              5540849569926 = 2 * 3^14 * 11^2 * 4787
  19      49188715           7258589148431106 = 2 * 3^17 * 28103531
  20      20490901           1259631112357206 = 2 * 3^15 * 17 * 73 * ...
  21     264422320         209757490471391841 =     3^16 * 11 * 17 * ...
  22     178328878          95403566542874409 =     3^19 * 19 * 83 * ...
  23    1340590345        5391547422002837766 = 2 * 3^19 * 11^2 * ...
  24    9476420614      269407642979285252217 =     3^22 * 2617 * ...
  25    5989636213      107627225904222216534 = 2 * 3^20 * 19 * 97 * ...
  26   72238539832    15655219911322828844337 =     3^22 * 11 * 19 * ...
  27  103619599441    32211064165147101736326 = 2 * 3^22 * 11 * 43 * ...
  28  668478672403  1340591206374369138728034 = 2 * 3^22 * 19 * 331 * ...
  29  794002910839  1891321867264002956873442 = 2 * 3^23 * 11 * 73 * ...
  30  417430195531   522743904423981537506946 = 2 * 3^25 * 11 * 17 * ...
.
As a result, the last digits of the ternary representation of a(n) tend to fall into a pattern:
.
   n      a(n)             a(n) in base 3
  --  ------------  ---------------------------
   0             0                          0_3
   1             2                          2_3
   2             1                          1_3
   3            13                        111_3
   4            19                        201_3
   5             7                         21_3
   6            61                       2021_3
   7           331                     110021_3
   8           169                      20021_3
   9          1141                    1120021_3
  10          6487                   22220021_3
  11           898                    1020021_3
  12         20581                 1001020021_3
  13        315826               121001020021_3
  14         59947                10001020021_3
  15        296143               120001020021_3
  16       1890466             10120001020021_3
  17       6141994            102120001020021_3
  18       1359025              2120001020021_3
  19      49188715          10102120001020021_3
  20      20490901           1102120001020021_3
  21     264422320         200102120001020021_3
  22     178328878         110102120001020021_3
  23    1340590345       10110102120001020021_3
  24    9476420614      220110102120001020021_3
  25    5989636213      120110102120001020021_3
  26   72238539832    20220110102120001020021_3
  27  103619599441   100220110102120001020021_3
  28  668478672403  2100220110102120001020021_3
  29  794002910839  2210220110102120001020021_3
  30  417430195531  1110220110102120001020021_3
(End)
		

Crossrefs

Programs

  • Maple
    N:= 18: # for a(0)..a(N)
    V:= Array(0..N): count:= 0:
    for k from 0 while count < N+1 do
      v:= numtheory:-bigomega(1+2*k+3*k^2);
    if v <= N and V[v] = 0 then
        count:= count+1; V[v]:= k
    fi
    od:
    convert(V,list);
  • Mathematica
    a[n_] := Module[{i = 0},While[! PrimeOmega[1 + 2 i + 3 i^2] == n, i += 1]; i]
    Table[a[n], {n, 0, 14}] (* Gerry Martens, Nov 05 2022 *)

Extensions

a(21)-a(22) from Amiram Eldar, Nov 04 2022
a(23)-a(30) from Jon E. Schoenfield, Nov 05 2022
Showing 1-7 of 7 results.