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

A078497 The member r of a triple of primes (p,q,r) in arithmetic progression which sum to 3*prime(n) = A001748(n) = p + q + r.

Original entry on oeis.org

7, 11, 17, 19, 23, 31, 29, 41, 43, 43, 53, 67, 53, 59, 71, 79, 73, 83, 79, 97, 107, 107, 127, 113, 109, 113, 139, 137, 151, 149, 167, 151, 167, 163, 163, 199, 197, 179, 191, 199, 233, 223, 227, 241, 223, 283, 257, 277, 239, 251, 271, 263, 263, 269, 281, 313
Offset: 3

Views

Author

Serhat Sevki Dincer (sevki(AT)ug.bilkent.edu.tr), Nov 27 2002

Keywords

Comments

In case more than one triple of primes p, q=p+d and r=p+2*d exists, we take r=a(n) from the triple with the smallest d. This shows the difference from A092940, which would take the maximum r over all triples. - R. J. Mathar, May 19 2007

Examples

			a(1) = 7 because 3+5+7 = 15;
a(2) = 11 because 3+7+11 = 21;
a(3) = 17 because 5+11+17= 33.
		

Crossrefs

Programs

  • Maple
    A078497 := proc(n) local p3, i,d,r,p; p3 := ithprime(n) ; i := n+1 ; while true do r := ithprime(i) ; d := r-p3 ; p := p3-d ; if isprime(p) then RETURN(r) ; fi ; i := i+1 ; od ; RETURN(-1) ; end: for n from 3 to 60 do printf("%d, ",A078497(n)) ; od ; # R. J. Mathar, May 19 2007
  • Mathematica
    f[n_] := Block[{p = Prime[n], k}, k = p + 1; While[ !PrimeQ[k] || !PrimeQ[2p - k], k++ ]; k]; Table[ f[n], {n, 3, 60}]

Extensions

Edited and extended by Robert G. Wilson v, Nov 29 2002
Further edited by N. J. A. Sloane, Jul 03 2008 at the suggestion of R. J. Mathar

A208296 Smallest positive nontrivial odd solution of the congruence x^2 == 1 (mod A001748(n+2)), n >= 1.

Original entry on oeis.org

11, 13, 23, 25, 35, 37, 47, 59, 61, 73, 83, 85, 95, 107, 119, 121, 133, 143, 145, 157, 167, 179, 193, 203, 205, 215, 217, 227, 253, 263, 275, 277, 299, 301, 313, 325, 335, 347, 359, 361, 383, 385, 395, 397, 421, 445, 455, 457, 467, 479, 481, 503, 515
Offset: 1

Views

Author

Wolfdieter Lang, Mar 14 2012

Keywords

Comments

The trivial solutions of the congruence x^2 == 1 (mod 3*prime(n+2)), n>=1, with the primes prime(n+2) = A000040(n+2) have positive representatives 1 and 3*prime(n+2)-1. There are all-together four incongruent solutions due to a general theorem (see, e.g., the Hardy-Wright reference, Theorem 122, p. 96, and also A060594) and the fact that the number of incongruent solutions of this congruence with odd prime modulus p is two, namely with positive representative p and p-1 (see, e.g., Hardy-Wright, Theorem 109, p. 85). a(n) is the smallest positive odd representative >1 which solves this congruence. The other nontrivial even representative solving this congruence is 3*prime(n+2) - a(n), i.e. 4, 8, 10, 14, 16, 20, ... See 2*A207336.
a(n) solves also the congruence x^2 == 1 (Modd A001748(n+2)), n>=1. For Modd n (not to be confused with mod n) see a comment on A203571. This follows from floor(a(n)^2/3*prime(n+2)) being even, in fact it is 8*A024699(n) (see a comment there), hence a(n)^2 (Modd 3*prime(n+2)) = a(n)^2 (mod 3*prime(n+2)) = 1. For those multiplicative groups Modd 3*p with p an odd prime which are cyclic (this is not possible in the mod case, see A033949), a(n) is the representative of the only other nontrivial solution of this congruence. The representative of the trivial solution is 1 (-1 belongs to the same Modd class). (The conjecture stated here earlier is wrong, that is, the multiplicative group Modd (91=7*13) is non-cyclic. It may still be true for 3*p. - Wolfdieter Lang, Mar 15 2012)

Examples

			a(3)=23 because prime(5)=11=A007528(2), hence K(3)=11 and sqrt(8*T(11)+1)=sqrt(8*66+1)= 23. 23^2 = 529 == 1 (Modd 33), because floor(529/33)=16=8*A024699(3) is even, and 529 == 1 (mod 33).
a(4)=25 because prime(6)=13=A002476(2), hence K(4)=12 and sqrt(8*T(12)+1)=sqrt(8*78+1)=25. 25^2 = 625 == 1 (Modd 39), because floor(625/39)=16=8*A024699(4) is even, and 625 == 1 (mod 39).
		

References

  • H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 5th ed., Clarendon Press, Oxford, 2003.

Crossrefs

Programs

  • Mathematica
    Table[SelectFirst[Solve[x^2==1 && x !=1,x, Modulus->3*Prime[n+2]][[All,1,2]],OddQ], {n, 53}] (* Jon Maiga, Sep 28 2019 *)

Formula

a(n) = sqrt(8*T(K(n))+1), with the triangular numbers T = A000217, and K(n) = prime(n+2)-1 if the prime prime(n+2) is of the form 6*k+1, i.e., from A002476, and K(n) = prime(n+2) if prime(n+2) is of the form 6*k-1, i.e. from A007528.
a(n)^2 == 1 (mod A001748(n+2)), n >= 1.
a(n)^2 == 1 (Modd A001748(n+2)), n >= 1.

A207336 One half of smallest positive nontrivial even solution of the congruence x^2 == 1 (mod A001748(n+2)), n>=1.

Original entry on oeis.org

2, 4, 5, 7, 8, 10, 11, 14, 16, 19, 20, 22, 23, 26, 29, 31, 34, 35, 37, 40, 41, 44, 49, 50, 52, 53, 55, 56, 64, 65, 68, 70, 74, 76, 79, 82, 83, 86, 89, 91, 95, 97, 98, 100, 106, 112, 113, 115, 116, 119
Offset: 1

Views

Author

Wolfdieter Lang, Mar 14 2012

Keywords

Comments

See the comments on A208296, which gives the representatives of the odd nontrivial solutions of the congruence x^2 == 1 (mod 3*prime(n+2)), with primes prime(n+2)=A000040(n+2), n>=1.

Examples

			The actual solutions are 4, 8, 10, 14, 16, 20, 22, 28, 32, 38, 40, 44, 46, 52, 58, 62, 68, 70, 74, 80, 82, 88, 98, 100, 104, 106, 110, 112, 128, 130, 136, 140, 148, 152, 158, 164, 166, 172, 178, 182, 190, 194, 196, 200, 212, 224, 226, 230, ...
n=4: 2*a(4) = 14 = 3*13 - 25. 14^2 = 196 == 1 (mod 39), 25^2 = 625 == 1 (mod 39). Representatives of the trivial solutions are 1 and 39-1= 38. All-together there are 4 incongruent solutions.
		

Crossrefs

Programs

  • Mathematica
    Table[(3*Prime[n+2]-SelectFirst[Solve[x^2==1 && x !=1,x,Modulus->3*Prime[n+2]][[All,1,2]],OddQ])/2, {n, 50}] (* Jon Maiga, Sep 28 2019 *)

Formula

a(n) = (3*prime(n+2) - A208296(n))/2, with the primes prime(n+2) = A000040(n+2), n>=1.

A100484 The primes doubled; Even semiprimes.

Original entry on oeis.org

4, 6, 10, 14, 22, 26, 34, 38, 46, 58, 62, 74, 82, 86, 94, 106, 118, 122, 134, 142, 146, 158, 166, 178, 194, 202, 206, 214, 218, 226, 254, 262, 274, 278, 298, 302, 314, 326, 334, 346, 358, 362, 382, 386, 394, 398, 422, 446, 454, 458, 466, 478, 482, 502, 514, 526
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 22 2004

Keywords

Comments

Essentially the same as A001747.
Right edge of the triangle in A065342. - Reinhard Zumkeller, Jan 30 2012
A253046(a(n)) > a(n). - Reinhard Zumkeller, Dec 26 2014
Apart from first term, these are the tau2-primes as defined in [Anderson, Frazier] and [Lanterman]. - Michel Marcus, May 15 2019
For every positive integer b and each m in this sequence b^(m-1) == b (mod m). - Florian Baur, Nov 26 2021

Crossrefs

Subsequence of A091376. After the initial 4 also a subsequence of A039956.
Cf. A001748, A253046, A353478 (characteristic function).
Row 3 of A286625, column 3 of A286623.

Programs

Formula

a(n) = 2 * A000040(n).
a(n) = A001747(n+1).
n>1: A000005(a(n)) = 4; A000203(a(n)) = 3*A008864(n); A000010(a(n)) = A006093(n); intersection of A001358 and A005843.
a(n) = A116366(n-1, n-1) for n>1. - Reinhard Zumkeller, Feb 06 2006
a(n) = A077017(n+1), n>1. - R. J. Mathar, Sep 02 2008
A078834(a(n)) = A000040(n). - Reinhard Zumkeller, Sep 19 2011
a(n) = A087112(n, 1). - Reinhard Zumkeller, Nov 25 2012
A000203(a(n)) = 3*n/2 + 3, n > 1. - Wesley Ivan Hurt, Sep 07 2013

Extensions

Simpler definition.

A018818 Number of partitions of n into divisors of n.

Original entry on oeis.org

1, 2, 2, 4, 2, 8, 2, 10, 5, 11, 2, 45, 2, 14, 14, 36, 2, 81, 2, 92, 18, 20, 2, 458, 7, 23, 23, 156, 2, 742, 2, 202, 26, 29, 26, 2234, 2, 32, 30, 1370, 2, 1654, 2, 337, 286, 38, 2, 9676, 9, 407, 38, 454, 2, 3132, 38, 3065, 42, 47, 2, 73155, 2, 50, 493, 1828, 44, 5257, 2, 740, 50, 5066
Offset: 1

Views

Author

Keywords

Comments

From Reinhard Zumkeller, Dec 11 2009: (Start)
For odd primes p: a(p^2) = p + 2; for n > 1: a(A001248(n)) = A052147(n);
For odd primes p > 3, a(3*p) = 2*p + 4; for n > 2: a(A001748(n)) = A100484(n) + 4. (End)
From Matthew Crawford, Jan 19 2021: (Start)
For a prime p, a(p^3) = (p^3 + p^2 + 2*p + 4)/2;
For distinct primes p and q, a(p*q) = (p+1)*(q+1)/2 + 2. (End)

Examples

			The a(6) = 8 representations of 6 are 6 = 3 + 3 = 3 + 2 + 1 = 3 + 1 + 1 + 1 = 2 + 2 + 2 = 2 + 2 + 1 + 1 = 2 + 1 + 1 + 1 + 1 = 1 + 1 + 1 + 1 + 1 + 1.
		

Crossrefs

Programs

  • Haskell
    a018818 n = p (init $ a027750_row n) n + 1 where
       p _      0 = 1
       p []     _ = 0
       p ks'@(k:ks) m | m < k     = 0
                      | otherwise = p ks' (m - k) + p ks m
    -- Reinhard Zumkeller, Apr 02 2012
    
  • Magma
    [#RestrictedPartitions(n,{d:d in Divisors(n)}): n in [1..100]]; // Marius A. Burtea, Jan 02 2019
  • Maple
    A018818 := proc(n)
        local a,p,w,el ;
        a := 0 ;
        for p in combinat[partition](n) do
            w := true ;
            for el in p do
                if modp(n,el) <> 0 then
                    w := false;
                    break;
                end if;
            end do:
            if w then
                a := a+1 ;
            end if;
        end do:
        a ;
    end proc: # R. J. Mathar, Mar 30 2017
  • Mathematica
    Table[d = Divisors[n]; Coefficient[Series[1/Product[1 - x^d[[i]], {i, Length[d]}], {x, 0, n}], x, n], {n, 100}] (* T. D. Noe, Jul 28 2011 *)
  • PARI
    a(n)=numbpartUsing(n, divisors(n));
    numbpartUsing(n, v, mx=#v)=if(n<1, return(n==0)); sum(i=1,mx, numbpartUsing(n-v[i],v,i)) \\ inefficient; Charles R Greathouse IV, Jun 21 2017
    
  • PARI
    A018818(n) = { my(p = Ser(1, 'x, 1+n)); fordiv(n, d, p /= (1 - 'x^d)); polcoef(p, n); }; \\ Antti Karttunen, Jan 23 2025, after Vladeta Jovovic
    

Formula

Coefficient of x^n in the expansion of 1/Product_{d|n} (1-x^d). - Vladeta Jovovic, Sep 28 2002
a(n) = 2 iff n is prime. - Juhani Heino, Aug 27 2009
a(n) = f(n,n,1), where f(n,m,k) = f(n,m,k+1) + f(n,m-k,k)*0^(n mod k) if k <= m, otherwise 0^m. - Reinhard Zumkeller, Dec 11 2009
Paul Erdős, Andrew M. Odlyzko, and the Editors of the AMM give bounds; see Bowman et al. - Charles R Greathouse IV, Dec 04 2012

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

A339195 Triangle of squarefree numbers grouped by greatest prime factor, read by rows.

Original entry on oeis.org

1, 2, 3, 6, 5, 10, 15, 30, 7, 14, 21, 35, 42, 70, 105, 210, 11, 22, 33, 55, 66, 77, 110, 154, 165, 231, 330, 385, 462, 770, 1155, 2310, 13, 26, 39, 65, 78, 91, 130, 143, 182, 195, 273, 286, 390, 429, 455, 546, 715, 858, 910, 1001, 1365, 1430, 2002, 2145, 2730, 3003, 4290, 5005, 6006, 10010, 15015, 30030
Offset: 0

Views

Author

Gus Wiseman, Dec 02 2020

Keywords

Comments

Also Heinz numbers of subsets of {1..n} that contain n if n>0, where the Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).
A019565 in its triangle form, with each row's terms in increasing order. - Peter Munn, Feb 26 2021
From David James Sycamore, Jan 09 2025: (Start)
Alternative definition, with offset = 1: a(1) = 1. For n>1 if a(n-1) = A002110(k), a(n) = prime(k+1). Otherwise a(n) is the smallest novel squarefree number whose prime factors have already occurred as previous terms.
Permutation of A005117, Squarefree version A379746. (End)

Examples

			Triangle begins:
   1
   2
   3   6
   5  10  15  30
   7  14  21  35  42  70  105  210
		

Crossrefs

A011782 gives row lengths.
A339360 gives row sums.
A008578 (shifted) is column k = 1.
A100484 is column k = 2.
A001748 is column k = 3.
A002110 is column k = 2^(n-1).
A070826 is column k = 2^(n-1) - 1.
A209862 takes prime indices to binary indices in these terms.
A246867 groups squarefree numbers by Heinz weight, with row sums A147655.
A261144 divides the n-th row by prime(n), with row sums A054640.
A339116 is the restriction to semiprimes, with row sums A339194.
A005117 lists squarefree numbers, ordered lexicographically by prime factors: A019565.
A006881 lists squarefree semiprimes.
A072047 counts prime factors of squarefree numbers.
A319246 is the sum of prime indices of the n-th squarefree number.
A329631 lists prime indices of squarefree numbers, reversed: A319247.
A338899/A270650/A270652 give the prime indices of squarefree semiprimes.
Cf. A379746.

Programs

  • Maple
    T:= proc(n) option remember; `if`(n=0, 1, (p-> map(
          x-> x*p, {seq(T(i), i=0..n-1)})[])(ithprime(n)))
        end:
    seq(T(n), n=0..6);  # Alois P. Heinz, Jan 08 2025
  • Mathematica
    Table[Prime[n]*Sort[Times@@Prime/@#&/@Subsets[Range[n-1]]],{n,5}]

Formula

For n > 1, T(n,k) = prime(n) * A261144(n-1,k).
a(n) = A019565(A379770(n)). - Michael De Vlieger, Jan 08 2025

Extensions

Row n=0 (term 1) prepended by Alois P. Heinz, Jan 08 2025

A288313 Let b(k) denote A056240(k); the sequence lists numbers b(2*n) where for all m > n, b(2*m) > b(2*n).

Original entry on oeis.org

2, 4, 8, 15, 21, 33, 39, 51, 57, 69, 87, 93, 111, 123, 129, 141, 159, 177, 183, 201, 213, 219, 237, 249, 267, 291, 303, 309, 321, 327, 339, 381, 393, 411, 417, 447, 453, 471, 489, 501, 519, 537, 543, 573, 579, 591, 597, 633, 669, 681, 687, 699, 717, 723, 753, 771, 789, 807, 813, 831, 843
Offset: 1

Views

Author

David James Sycamore, Jun 07 2017

Keywords

Comments

This is an ascending subsequence of A056240 with even argument terms.
After the first three (even) terms, a(1) = b(2) = 2, a(2) = b(4) = 4, a(3) = b(6) = 8 respectively, all subsequent terms are odd (semiprime) numbers of the form 3*r, for r = primes 5, 7, 11, 13, .... The graph of all odd-valued terms a(n) for n >= 4 is a straight line (y = 3*x - 9), corresponding to b(2*n) = 3*(2*n) - 9 = 3*(2*n - 3) = 3*r, where r = 2*n - 3 is prime, and n is in sequence A098090. The sequence a(n) for n >= 4 is identical term for term to A001748(n) for n >= 3. In other words, for n >= 4, a(n) = 3*A000040(n-1).
If, for any even number n >= 6, n - 3 is prime, then A056240(n) belongs to this sequence.

Examples

			a(1) = 2 is included because for all n > 1, b(2n) > 2; likewise a(2) = b(4) = 4, and a(3) = b(6) = 8 are included. The first odd term, a(4) = b(8) = 15, is included since for all n > 4, b(2n) > 15. b(12) = 35 is not in this sequence because b(14) = 33 < 35, and only ascending terms are permitted.
		

Crossrefs

Cf. A000040, A001748, A056240, A098090. Essentially the same as A063534.

Programs

  • Mathematica
    Join[{2, 4, 8}, 3*Prime[Range[3, 100]]] (* Paolo Xausa, Apr 16 2024 *)

Formula

a(1) = 2, a(2) = 4, a(3) = 8, and for n >= 4, a(n) = 3*A000040(n-1).

Extensions

Offset changed to 1 and entry edited to reflect this change by Michel Marcus, Jul 03 2017

A331634 a(n) is the greatest possible least part of any prime partition of n.

Original entry on oeis.org

2, 3, 2, 5, 3, 7, 3, 3, 5, 11, 5, 13, 7, 5, 5, 17, 7, 19, 7, 7, 11, 23, 11, 7, 13, 7, 11, 29, 13, 31, 13, 11, 17, 11, 17, 37, 19, 13, 17, 41, 19, 43, 13, 13, 23, 47, 19, 13, 19, 17, 23, 53, 23, 17, 19, 19, 29, 59, 29, 61, 31, 17, 23, 19, 29, 67, 31, 23, 29, 71
Offset: 2

Views

Author

David James Sycamore, Jan 23 2020

Keywords

Examples

			a(12) = 5, because 5 is the largest of all minimal primes in partitions of 12 into prime parts: [2,2,2,2,2,2], [2,2,2,3,3], [3,3,3,3], [2,2,3,5], [2,5,5], [2,3,7], [5,7].
		

Crossrefs

Programs

  • Maple
    b:= proc(n, p, t) option remember; `if`(n=0, 1, `if`(p>n, 0, (q->
          add(b(n-p*j, q, 1), j=1..n/p)*t^p+b(n, q, t))(nextprime(p))))
        end:
    a:= n-> degree(b(n, 2, x)):
    seq(a(n), n=2..100);  # Alois P. Heinz, Mar 13 2020
  • Mathematica
    Array[If[PrimeQ@ #, #, Max@ IntegerPartitions[#, #/FactorInteger[#][[1, 1]], Prime@ Range@ PrimePi[# - 2]][[All, -1]] ] &, 60, 2] (* Michael De Vlieger, Jan 26 2020 *)
    (* Second program: *)
    b[n_, p_, t_] := b[n, p, t] = If[n == 0, 1, If[p > n, 0, Function[q, Sum[
         b[n - p*j, q, 1], {j, 1, n/p}]*t^p + b[n, q, t]][NextPrime[p]]]];
    a[n_] := Exponent[b[n, 2, x], x];
    a /@ Range[2, 100] (* Jean-François Alcover, Jun 04 2021, after Alois P. Heinz *)

Formula

For prime p>2, a(p) = a(2*p) = a(3*p) = p.
Showing 1-10 of 41 results. Next