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

A036468 Number of ways to represent 2n+1 as a+b with 0 < a < b and a^2 + b^2 prime.

Original entry on oeis.org

1, 2, 2, 2, 3, 3, 4, 4, 4, 3, 4, 8, 4, 6, 5, 4, 9, 8, 6, 9, 7, 7, 7, 5, 7, 9, 14, 8, 9, 11, 7, 17, 11, 10, 9, 11, 9, 8, 13, 9, 15, 20, 11, 14, 13, 8, 18, 14, 10, 18, 16, 10, 17, 16, 13, 20, 20, 13, 14, 17, 12, 23, 18, 14, 22, 15, 17, 18, 21, 12, 19, 29, 16, 23, 21, 14, 27, 24
Offset: 1

Views

Author

Keywords

Comments

Zhang Ming-Zhi (zamiz(AT)mail.sc.cninfo.net) asks if a(m) is always > 0.
I have confirmed that a(n) > 0 for 0 < n < 10^7. - T. D. Noe, Oct 17 2004
This open problem is mentioned by Guy at the end of section C1. - T. D. Noe, Apr 22 2009
a(n) <= phi(2n+1)/2, where phi(m) = A000010(m), while a(n) = phi(2n+1)/2 only for n = 1, 2, and 7. - Thomas Ordowski, Jan 25 2014
Records in a(n) are for 2n+1 = 3, 5, 11, 15, 25, 35, 55, 65, 85, 125, 145, 185, 205, 215, 235, 265, 295, 325, 365, 415, ... cf. A001750. - Thomas Ordowski, Mar 02 2017
a(n) tends to be larger for n == 2 (mod 5): see plot in Links. - Robert Israel, Mar 02 2017
Number of primes p = ((2n+1)^2 + x^2)/2 for positive integers x < 2n+1. - Thomas Ordowski, Mar 06 2017

References

  • R. K. Guy, Unsolved Problems in Theory of Numbers, Section C1.

Crossrefs

Programs

  • Maple
    a:= n-> add(`if`(isprime(i^2+(2*n+1-i)^2), 1, 0), i=1..n):
    seq(a(n), n=1..80);  # Alois P. Heinz, Jul 09 2016
  • Mathematica
    Table[cnt=0; m=2n+1; Do[If[PrimeQ[k^2+(m-k)^2], cnt++ ], {k, n}]; cnt, {n, 100}]
  • PARI
    a(n)=sum(k=1,n,isprime(k^2+(2*n-k+1)^2)) \\ Charles R Greathouse IV, Jan 09 2014

Formula

a(n) = O(n/log(n)). - Thomas Ordowski, Feb 11 2013

Extensions

More terms from David W. Wilson and Michael Kleber

A339116 Triangle of all squarefree semiprimes grouped by greater prime factor, read by rows.

Original entry on oeis.org

6, 10, 15, 14, 21, 35, 22, 33, 55, 77, 26, 39, 65, 91, 143, 34, 51, 85, 119, 187, 221, 38, 57, 95, 133, 209, 247, 323, 46, 69, 115, 161, 253, 299, 391, 437, 58, 87, 145, 203, 319, 377, 493, 551, 667, 62, 93, 155, 217, 341, 403, 527, 589, 713, 899
Offset: 2

Views

Author

Gus Wiseman, Dec 01 2020

Keywords

Comments

A squarefree semiprime is a product of any two distinct prime numbers.

Examples

			Triangle begins:
   6
  10  15
  14  21  35
  22  33  55  77
  26  39  65  91 143
  34  51  85 119 187 221
  38  57  95 133 209 247 323
  46  69 115 161 253 299 391 437
  58  87 145 203 319 377 493 551 667
  62  93 155 217 341 403 527 589 713 899
		

Crossrefs

A339194 gives row sums.
A100484 is column k = 1.
A001748 is column k = 2.
A001750 is column k = 3.
A006094 is column k = n - 1.
A090076 is column k = n - 2.
A319613 is the central column k = 2*n.
A087112 is the not necessarily squarefree version.
A338905 is a different triangle of squarefree semiprimes.
A339195 is the generalization to all squarefree numbers, row sums A339360.
A001358 lists semiprimes.
A005117 lists squarefree numbers.
A006881 lists squarefree semiprimes, with odd terms A046388.
A024697 is the sum of semiprimes of weight n.
A025129 is the sum of squarefree semiprimes of weight n.
A332765 gives the greatest squarefree semiprime of weight n.
A338898/A338912/A338913 give the prime indices of semiprimes, with product A087794, sum A176504, and difference A176506.
A338899/A270650/A270652 give the prime indices of squarefree semiprimes, with difference A338900.
A338904 groups semiprimes by weight.
A338907/A338908 list squarefree semiprimes of odd/even weight.
Subsequence of A019565.

Programs

  • Mathematica
    Table[Prime[i]*Prime[j],{i,2,10},{j,i-1}]
  • PARI
    row(n) = {prime(n)*primes(n-1)}
    { for(n=2, 10, print(row(n))) } \\ Andrew Howroyd, Jan 19 2023

Formula

T(n,k) = prime(n) * prime(k) for k < n.

Extensions

Offset corrected by Andrew Howroyd, Jan 19 2023

A138636 a(n) = 6 * prime(n).

Original entry on oeis.org

12, 18, 30, 42, 66, 78, 102, 114, 138, 174, 186, 222, 246, 258, 282, 318, 354, 366, 402, 426, 438, 474, 498, 534, 582, 606, 618, 642, 654, 678, 762, 786, 822, 834, 894, 906, 942, 978, 1002, 1038, 1074, 1086, 1146, 1158, 1182, 1194, 1266, 1338, 1362, 1374
Offset: 1

Views

Author

Keywords

Comments

Column 5 of A272214. - Omar E. Pol, Apr 29 2016

Examples

			2*6=12, 3*6=18, ...
		

Crossrefs

Programs

  • Magma
    [6*p: p in PrimesUpTo(300)]; // Vincenzo Librandi, Mar 27 2014
    
  • Mathematica
    6*Prime[Range[100]]
  • PARI
    vector(50, n, 6*prime(n)) \\ G. C. Greubel, Feb 02 2019
    
  • Sage
    [6*nth_prime(n) for n in (1..50)] # G. C. Greubel, Feb 02 2019

A264102 Numbers n with the property that the symmetric representation of sigma(n) has four parts, each of width one.

Original entry on oeis.org

21, 27, 33, 39, 51, 55, 57, 65, 69, 85, 87, 93, 95, 111, 115, 119, 123, 125, 129, 133, 141, 145, 155, 159, 161, 177, 183, 185, 201, 203, 205, 213, 215, 217, 219, 230, 235, 237, 249, 250, 253, 259, 265, 267, 287, 290, 291, 295, 301, 303, 305, 309, 310, 319, 321, 327, 329, 335
Offset: 1

Views

Author

Hartmut F. W. Hoft, Nov 03 2015

Keywords

Comments

The areas of the first two regions are (2^(m+1) - 1) * (p * q + 1) / 2 and (2^(m+1) - 1) * (p + q) / 2, respectively. Twice their sum equals sigma(n) = (2^(m+1) - 1) * (p + 1) * (q + 1).
For a proof of the formula for this sequence see the link.

Examples

			65 = 5*13 is in the sequence since m = 0 and 2 < 5 < 10 < 13. The first two regions in the symmetric representation of sigma(65) = 84 start with legs 1 and 5 of the Dyck path and have areas 33 and 9, respectively.
406 = 2*7*29 is in the sequence since m=1 and 4 < 7 < 28 < 29. The first two regions in the symmetric representation of sigma(406) = 720 start with legs 1 and 7 and have areas 306 and 54, respectively. Note also that 406 is a triangular number and the middle two regions meet at the center of the Dyck path.
One case in the formula for the sequence is the 3-parameter expression n = 2^m * p * q with p and q distinct primes satisfying the stated conditions. That subsequence can be visualized as a skew tetrahedron since the start of each "line" on an irregular "triangular" side of the "tetrahedron" is determined by a different prime number and each layer is determined by a different power of two. Below are the first three layers with primes p designating columns and primes q rows.
m=0| 3    5    7    11   13
-----------------------------
7  | 21
11 | 33   55
13 | 39   65
17 | 51   85   119
19 | 57   95   133
23 | 69   115  161  253
29 | 87   145  203  319  377
31 | 93   155  217  341  403
37 | 111  185  259  407  481
41 | 123  205  287  451  533
...
89 | 267  445  623  979  1157
...
Column 1 is A001748 except for the first three terms and column 2 is A001750 except for the first four terms in the two resepctive sequences.
m=1| 3    5    7    11   13
-------------------------------
23 |     230
29 |     290  406
31 |     310  434
37 |     370  518
41 |     410  574
43 |     430  602
47 |     470  658  1034
53 |     530  742  1166  1378
...
89 |     890  1246 1958  2314
...
m=2| 3    5    7    11   13
-------------------------------
89 |               3916
97 |               4268
101|               4444
103|               4532
107|               4708  5564
109|               4796  5668
...
The fourth layer for m = 3 starts with number 37672 in column p = 17 and row q = 277.
The subsequence of the 2-parameter case n = 2^m * p^3 with 2^(m+1) < p gives rise to the following irregular triangle:
p\m| 0      1       2       3
----------------------------------
3  | 27
5  | 125    250
7  | 343    686
11 | 1331   2662    5324
13 | 2197   4394    8788
17 | 4913   9826    19652   39304
19 | 6859   13718   27436   54872
23 | 12167  24334   48668   97336
29 | 24389  48778   97556   195112
...
The first column in this triangle is A030078 except for the first term and the second column is A172190 except for the first two terms respectively in the two sequences.
		

Crossrefs

For symmetric representation of sigma: A235791, A236104, A237270, A237271, A237591, A237593, A241008, A246955.
Subsequence of A280107.

Programs

  • Mathematica
    mpStalk[m_, p_, bound_] := Module[{q=NextPrime[2^(m+1)*p], list={}}, While[2^m*p*q<=bound, AppendTo[list, 2^m*p*q]; q=NextPrime[q]]; If[2^m*p^3<=bound, AppendTo[list, 2^m*p^3]]; list]
    mTriangle[m_, bound_] := Module[{p=NextPrime[2^(m+1)], list={}}, While[2^m*p*NextPrime[2^(m+1)*p]<=bound, list=Union[list, mpStalk[m, p, bound]]; p=NextPrime[p]]; list]
    (* 2^(4m+3)<=bound is a simpler test, but computes some empty stalks *)
    a264102[bound_] := Module[{m=0, list={}}, While[2^m*NextPrime[2^(m+1)]*NextPrime[2^(m+1)*NextPrime[2^(m+1)]]<=bound, list=Union[list, mTriangle[m, bound]]; m++]; list]
    a264102[335] (* data *)

Formula

n = 2^m * p * q where m >= 0, p > 2 is prime, 2^(m+1) < p < 2^(m+1) * p < q, and either q is prime or q = p^2.

A272470 7 times the primes.

Original entry on oeis.org

14, 21, 35, 49, 77, 91, 119, 133, 161, 203, 217, 259, 287, 301, 329, 371, 413, 427, 469, 497, 511, 553, 581, 623, 679, 707, 721, 749, 763, 791, 889, 917, 959, 973, 1043, 1057, 1099, 1141, 1169, 1211, 1253, 1267, 1337, 1351, 1379, 1393, 1477, 1561, 1589, 1603, 1631, 1673, 1687, 1757, 1799, 1841, 1883, 1897
Offset: 1

Views

Author

Omar E. Pol, Apr 30 2016

Keywords

Crossrefs

Column 4 of A272214.
k times the primes (k=1..6): A000040, A100484, A001748, A001749, A001750, A138636.

Programs

  • Mathematica
    7 Prime@ Range@ 58 (* Michael De Vlieger, May 01 2016 *)
  • PARI
    a(n) = 7*prime(n); \\ Michel Marcus, May 01 2016
    
  • Python
    from sympy import prime
    for n in range(1,1000):print(7*prime(n),end=", ") # Soumil Mandal, May 08 2016

Formula

a(n) = 7*prime(n) = 7*A000040(n).

A322366 Number of integers k in {0,1,...,n} such that k identical test tubes can be balanced in a centrifuge with n equally spaced holes.

Original entry on oeis.org

1, 0, 2, 2, 3, 2, 5, 2, 5, 4, 7, 2, 11, 2, 9, 8, 9, 2, 17, 2, 17, 10, 13, 2, 23, 6, 15, 10, 23, 2, 29, 2, 17, 14, 19, 12, 35, 2, 21, 16, 37, 2, 41, 2, 35, 38, 25, 2, 47, 8, 47, 20, 41, 2, 53, 16, 51, 22, 31, 2, 59, 2, 33, 52, 33, 18, 65, 2, 53, 26, 67, 2, 71, 2, 39, 68, 59, 18, 77, 2, 77, 28, 43, 2, 83, 22, 45, 32, 79
Offset: 0

Views

Author

Alois P. Heinz, Dec 04 2018

Keywords

Comments

Numbers where a(n) + A000010(n) != n + 1: A102467. - Robert G. Wilson v, Aug 23 2021

Examples

			a(6) = |{0,2,3,4,6}| = 5.
a(9) = |{0,3,6,9}| = 4.
a(10) = |{0,2,4,5,6,8,10}| = 7.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; local f, b; f, b:=
           map(i-> i[1], ifactors(n)[2]),
           proc(m, i) option remember; m=0 or i>0 and
            (b(m, i-1) or f[i]<=m and b(m-f[i], i))
           end; forget(b); (t-> add(
          `if`(b(j, t) and b(n-j, t), 1, 0), j=0..n))(nops(f))
        end:
    seq(a(n), n=0..100);
  • Mathematica
    $RecursionLimit = 4096;
    a[1] = 0;
    a[n_] := a[n] = Module[{f, b}, f = FactorInteger[n][[All, 1]];
         b[m_, i_] := b[m, i] = m == 0 || i > 0 &&
         (b[m, i - 1] || f[[i]] <= m && b[m - f[[i]], i]);
         With[{t = Length[f]}, Sum[
         If[b[j, t] && b[n - j, t], 1, 0], {j, 0, n}]]];
    Table[a[n], {n, 0, 1000}] (* Jean-François Alcover, Dec 13 2018, after Alois P. Heinz, corrected and updated Aug 07 2021 *)
    f[n_] := Block[{c = 2, k = 2, p = First@# & /@ FactorInteger@ n}, While[k < n, If[ IntegerPartitions[k, All, p, 1] != {} && IntegerPartitions[n - k, All, p, 1] != {}, c++]; k++]; c]; f[0] = 1; f[1] = 0; Array[f, 75] (* Robert G. Wilson v, Aug 22 2021 *)

Formula

a(n) = |{ k : k and n-k can be written as a sum of prime factors of n }|.
a(n) = 2 <=> n is prime (A000040).
a(n) >= n-1 <=> n in {1,2,3,4} union { A008588 }.
a(n) = (n+4)/2 <=> n in { A100484 } minus { 4 }.
a(n) = (n+9)/3 <=> n in { A001748 } minus { 9 }.
a(n) = (n+25)/5 <=> n in { A001750 } minus { 25 }.
a(n) = (n+49)/7 <=> n in { A272470 } minus { 49 }.
a(n^2) = n+1 <=> n = 0 or n is prime <=> n in { A182986 }.
a(A001248(n)) = A008864(n).
a(n) is odd <=> n in { A163300 }.
a(n) is even <=> n in { A004280 }.

A281543 Number of partitions n = x + y with y >= x > 0 such that x^2 + y^2 or (x^2 + y^2)/2 is prime.

Original entry on oeis.org

0, 1, 1, 1, 2, 1, 2, 1, 2, 2, 3, 2, 3, 1, 4, 3, 4, 1, 4, 4, 3, 2, 4, 1, 8, 4, 4, 3, 6, 3, 5, 3, 4, 4, 9, 3, 8, 4, 6, 6, 9, 2, 7, 4, 7, 5, 7, 3, 5, 7, 7, 6, 9, 4, 14, 4, 8, 4, 9, 4, 11, 7, 7, 6, 17, 5, 11, 6, 10, 8, 9, 5, 11, 6, 9, 7, 8, 3, 13, 9, 9, 5, 15, 5, 20, 8, 11, 8, 14, 7, 13, 9, 8, 6, 18, 7, 14, 10, 10, 8
Offset: 1

Views

Author

Thomas Ordowski and Altug Alkan, Mar 01 2017

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1.
We have a(n) <= phi(n)/2 for n <> 2, because must be gcd(x,y) = 1.
Numbers n such that a(n) = phi(n)/2 are 3, 4, 5, 6, 10, 12, 15, and 20.
Record values of a(n) are for n = 1, 2, 5, 11, 15, 25, 35, 55, 65, 85, 125, 145, 185, 205, 215, 235, 265, 295, 325, 365, 415, ... cf. A001750.

Examples

			a(5) = 2 because 5 = 1 + 4 and 5 = 2 + 3 are only options; 1^2 + 4^2 = 17 and 2^2 + 3^2 = 13 are primes.
a(6) = 1 because 6 = 1 + 5 is only option; (1^2 + 5^2)/2 = 13 is prime.
a(7) = 2 because 7 = 1 + 6, 7 = 2 + 5 and 7 = 3 + 4, but 3^2 + 4^2 = 5^2.
		

Crossrefs

Programs

  • PARI
    a(n) = if(n==2, 1, if(n%2==0, sum(k=1, n/2-1, isprime(n^2/4+k^2)), sum(k=1, (n-1)/2, isprime(k^2+(n-k)^2))));

Formula

a(2m+1) = A036468(m) for m > 0.
a(2m) = A069004(m) for m > 1.
a(n) = O(n/log(n)).

A309131 Triangle read by rows: T(n, k) = (n - k)*prime(1 + k), with 0 <= k < n.

Original entry on oeis.org

2, 4, 3, 6, 6, 5, 8, 9, 10, 7, 10, 12, 15, 14, 11, 12, 15, 20, 21, 22, 13, 14, 18, 25, 28, 33, 26, 17, 16, 21, 30, 35, 44, 39, 34, 19, 18, 24, 35, 42, 55, 52, 51, 38, 23, 20, 27, 40, 49, 66, 65, 68, 57, 46, 29, 22, 30, 45, 56, 77, 78, 85, 76, 69, 58, 31
Offset: 1

Views

Author

Stefano Spezia, Jul 14 2019

Keywords

Comments

T(n, k) is the k-superdiagonal sum of an n X n Toeplitz matrix M(n) whose first row consists of successive prime numbers prime(1), ..., prime(n).
The h-th subdiagonal of the triangle T gives the primes multiplied by (h + 1).
The k-th column of the triangle T gives the multiples of prime(1 + k).
Also array A(n, k) = n*prime(1 + k) read by ascending antidiagonals, with 0 <= k < n. - Michel Marcus, Jul 15 2019

Examples

			The triangle T(n, k) begins:
---+-----------------------------------------------------
n\k|    0     1     2     3     4     5     6     7     8
---+-----------------------------------------------------
1  |    2
2  |    4     3
3  |    6     6     5
4  |    8     9    10     7
5  |   10    12    15    14    11
6  |   12    15    20    21    22    13
7  |   14    18    25    28    33    26    17
8  |   16    21    30    35    44    39    34    19
9  |   18    24    35    42    55    52    51    38    23
...
For n = 3 the matrix M(3) is
          2,         3,         5
    M_{2,1},         2,         3
    M_{3,1},   M_{3,2},         2
and therefore T(3, 0) = 2 + 2 + 2 = 6, T(3, 1) = 3 + 3 = 6, and T(3, 2) = 5.
		

Crossrefs

Cf. A000040: diagonal; A001747: 1st subdiagonal; A001748: 2nd subdiagonal; A001749: 3rd subdiagonal; A001750: 4th subdiagonal; A005843: 0th column; A008585: 1st column; A008587: 2nd column; A008589: 3rd column; A008593: 4th column; A008595: 5th column; A008599: 6th column; A008601: 7th column; A014148: row sums; A138636: 5th subdiagonal; A272470: 6th subdiagonal.

Programs

  • Magma
    [[(n-k)*NthPrime(1+k): k in [0..n-1]]: n in [1..11]]; // triangle output
    
  • Maple
    a:=(n, k)->(n-k)*ithprime(1+k): seq(seq(a(n, k), k=0..n-1), n=1..11);
  • Mathematica
    Flatten[Table[(n-k)*Prime[1+k],{n,1,11},{k,0,n-1}]]
  • PARI
    T(n, k) = (n - k)*prime(1 + k);
    tabl(nn) = for(n=1, nn, for(k=0, n-1, print1(T(n, k), ", ")); print); \\ triangle output
    
  • Sage
    [[(n-k)*Primes().unrank(k) for k in (0..n-1)] for n in (1..11)] # triangle output

Formula

T(n, k) = A025581(n, k)*A000040(1 + k).

A068547 Numbers m such that m*tau(m)>5*prime(m).

Original entry on oeis.org

2520, 3360, 3780, 3960, 4200, 4320, 5040, 6300, 6720, 7200, 7560, 7920, 8400, 8640, 8820, 9240, 9360, 9900, 10080, 10560, 10800, 10920, 11088, 11340, 11520, 11700, 11760, 11880, 12096, 12240, 12480, 12600, 12960, 13104, 13200, 13440, 13680
Offset: 1

Views

Author

Benoit Cloitre, Mar 22 2002

Keywords

Crossrefs

Programs

  • Maple
    R:= NULL: count:= 0: p:= 0:
    for n from 1 while count < 100 do
      p:= nextprime(p);
      if n * numtheory:-tau(n) > 5 * p then R:= R,n; count:= count+1;  fi;
    od:
    R; # Robert Israel, May 13 2025
  • Mathematica
    Select[Range[15000],# DivisorSigma[0,#]>5 Prime[#]&] (* Harvey P. Dale, Jul 17 2023 *)

A133321 Inserting any (identical) digit between adjacent digits of an odd semiprime k never yields a prime.

Original entry on oeis.org

15, 25, 35, 55, 65, 85, 95, 115, 121, 143, 145, 155, 185, 187, 205, 215, 235, 253, 265, 295, 299, 305, 335, 341, 355, 365, 393, 395, 411, 415, 437, 445, 451, 473, 485, 505, 515, 535, 545, 565, 583, 635, 655, 671, 679, 685, 695, 717, 745, 755, 781, 785, 815
Offset: 1

Views

Author

Jonathan Vos Post, Oct 18 2007

Keywords

Comments

Odd semiprime analog of A050805. Trivially true for any digit if we substitute "even semiprime" for "odd semiprime." Trivially true for any semiprime which is a multiple of 5 (A001750). The nonmultiples of 5 in this sequence begin 121, 143, 187, 253, 299, 341.

Examples

			121 is in the sequence because 10201, 11211, 12221, 13231, 14241, 15251, 16261, 17271, 18281, 19291 are all composite.
		

Crossrefs

Programs

  • Mathematica
    Select[Select[Range[11,900,2],PrimeOmega[#]==2&],AllTrue[Table[ FromDigits[ Riffle[ IntegerDigits[#],n]],{n,0,9}],CompositeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Mar 07 2018 *)

Extensions

More terms from R. J. Mathar, Oct 22 2007
Showing 1-10 of 12 results. Next