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

A102615 Nonprime numbers of order 2.

Original entry on oeis.org

1, 8, 10, 14, 15, 16, 20, 22, 24, 25, 27, 30, 32, 33, 35, 36, 38, 39, 40, 44, 46, 48, 49, 50, 51, 54, 55, 56, 58, 62, 63, 64, 66, 68, 69, 70, 72, 75, 76, 77, 78, 80, 82, 85, 86, 87, 88, 90, 92, 93, 94, 96, 99, 100, 102, 104, 105, 108, 110, 111, 114, 115, 116, 117, 118, 120
Offset: 1

Views

Author

Cino Hilliard, Jan 31 2005

Keywords

Comments

nps(n,0) -> list nonprime(n) or the sequence of nonprime numbers. nps(n,1) -> list nonprime(nonprime(n)) or nps of order 1 nps(n,2) -> list nonprime(nonprime(nonprime(n))) or nps of order 2 ..... The order is the number of nestings - 1. We avoid the nestings in the script with a loop.
Nonprimes (A018252) with nonprime (A018252) subscripts. a(n) U A078782(n) = A018252(n), a(n+1) U A175250(n) = A018252(n) for n >= 1. a(n) = nonprime(nonprime(n)) = A018252(A018252(n)). a(4) = 14 because a(4) = b(b(4)) = b(8) = 14, b = nonprime. a(1) = 1, a(n) = nonprimes (A018252) with composite (A002808) subscripts for n >=2. [Jaroslav Krizek, Mar 13 2010]

Examples

			Nonprime(2) = 4.
Nonprime(4) = 8 the second entry.
		

Crossrefs

Cf. A018252.
Let A = primes A000040, B = nonprimes A018252. The 2-level compounds are AA = A006450, AB = A007821, BA = A078782, BB = A102615. The 3-level compounds AAA, AAB, ..., BBB are A038580, A049078, A270792, A102617, A270794, A270796, A102216.

Programs

  • Maple
    # For Maple code for the prime/nonprime compound sequences (listed in cross-references) see A003622.  - N. J. A. Sloane, Mar 30 2016
  • Mathematica
    nonPrime[n_] := FixedPoint[n + PrimePi[ # ] &, n]; Nest[nonPrime, Range[66], 2] (* Robert G. Wilson v, Feb 04 2005 *)
  • PARI
    \We perform nesting(s) with a loop. cics(n,m) = { local(x,y,z); for(x=1,n, z=x; for(y=1,m+1, z=composite(z); ); print1(z",") ) } composite(n) = \ The n-th composite number. 1 is defined as a composite number. { local(c,x); c=1; x=0; while(c <= n, x++; if(!isprime(x),c++); ); return(x) }

Extensions

Edited by Robert G. Wilson v, Feb 04 2005

A078782 Nonprimes (A018252) with prime (A000040) subscripts.

Original entry on oeis.org

4, 6, 9, 12, 18, 21, 26, 28, 34, 42, 45, 52, 57, 60, 65, 74, 81, 84, 91, 95, 98, 106, 112, 119, 128, 133, 135, 141, 143, 147, 165, 170, 177, 180, 192, 195, 203, 209, 214, 220, 228, 231, 244, 246, 250, 253, 267, 284, 288, 290, 295, 301, 303, 316, 323, 329, 336
Offset: 1

Views

Author

Joseph L. Pe, Jan 09 2003

Keywords

Comments

a(n) = A018252(A000040(n)). Subsequence of A175250 (nonprimes (A018252) with noncomposite (A008578) subscripts), a(n) = A175250(n+1). a(n) U A102615(n) = A018252(n). [From Jaroslav Krizek, Mar 13 2010]

Examples

			a(4) = nonprime(prime(4)) = nonprime(7) = 12.
		

Crossrefs

Let A = primes A000040, B = nonprimes A018252. The 2-level compounds are AA = A006450, AB = A007821, BA = A078782, BB = A102615. The 3-level compounds AAA, AAB, ..., BBB are A038580, A049078, A270792, A102617, A270794, A270796, A102216.

Programs

  • Python
    from sympy import prime, composite
    def A078782(n): return composite(prime(n)-1) # Chai Wah Wu, Nov 13 2024

Extensions

Corrected by Jaroslav Krizek, Mar 13 2010

A102617 Primes p(n) such that n is a second-order nonprime number.

Original entry on oeis.org

2, 19, 29, 43, 47, 53, 71, 79, 89, 97, 103, 113, 131, 137, 149, 151, 163, 167, 173, 193, 199, 223, 227, 229, 233, 251, 257, 263, 271, 293, 307, 311, 317, 337, 347, 349, 359, 379, 383, 389, 397, 409, 421, 439, 443, 449, 457, 463, 479, 487, 491, 503, 523, 541
Offset: 1

Views

Author

Cino Hilliard, Jan 31 2005

Keywords

Comments

The prime/nonprime compound sequence ABB. - N. J. A. Sloane, Apr 06 2016

Examples

			Nonprime(4) = 8.
The 8th prime is 19, the second entry.
		

Crossrefs

Let A = primes A000040, B = nonprimes A018252. The 2-level compounds are AA = A006450, AB = A007821, BA = A078782, BB = A102615. The 3-level compounds AAA, AAB, ..., BBB are A038580, A049078, A270792, A102617, A270794, A270796, A102216.

Programs

  • Maple
    For Maple code for the prime/nonprime compound sequences (listed in cross-references) see A003622. - N. J. A. Sloane, Mar 30 2016
  • Mathematica
    nonPrime[n_Integer] := FixedPoint[n + PrimePi[ # ] &, n]; Prime /@ nonPrime /@ nonPrime /@ Range[54] (* Robert G. Wilson v, Feb 04 2005 *)
  • PARI
    \We perform nesting(s) with a loop. cips(n,m) = { local(x,y,z); for(x=1,n, z=x; for(y=1,m+1, z=composite(z); ); print1(prime(z)",") ) } composite(n) = \ The n-th composite number. 1 is defined as a composite number. { local(c,x); c=1; x=0; while(c <= n, x++; if(!isprime(x),c++); ); return(x) }

Extensions

Edited by Robert G. Wilson v, Feb 04 2005

A270792 The prime/nonprime compound sequence ABA.

Original entry on oeis.org

7, 13, 23, 37, 61, 73, 101, 107, 139, 181, 197, 239, 269, 281, 313, 373, 419, 433, 467, 499, 521, 577, 613, 653, 719, 751, 761, 811, 823, 853, 977, 1013, 1051, 1069, 1163, 1187, 1237, 1289, 1307, 1373, 1439, 1453, 1549, 1559, 1583
Offset: 1

Views

Author

N. J. A. Sloane, Mar 30 2016

Keywords

Crossrefs

Let A = primes A000040, B = nonprimes A018252. The 2-level compounds are AA = A006450, AB = A007821, BA = A078782, BB = A102615. The 3-level compounds AAA, AAB, ..., BBB are A038580, A049078, A270792, A102617, A270794, A270796, A102216.

Programs

  • Maple
    # For Maple code for the prime/nonprime compound sequences (listed in cross-references) see A003622.  - N. J. A. Sloane, Mar 30 2016

A270794 The prime/nonprime compound sequence BAA.

Original entry on oeis.org

6, 9, 18, 26, 45, 57, 81, 91, 112, 143, 165, 203, 228, 244, 267, 303, 345, 354, 411, 437, 454, 495, 530, 564, 623, 668, 687, 714, 728, 749, 856, 893, 931, 959, 1032, 1054, 1104, 1158, 1185, 1233, 1268, 1298, 1372, 1392, 1425, 1445, 1539, 1672, 1698, 1714, 1742, 1773, 1802, 1886, 1914, 1966, 2031, 2050, 2104
Offset: 1

Views

Author

N. J. A. Sloane, Mar 30 2016

Keywords

Crossrefs

Let A = primes A000040, B = nonprimes A018252. The 2-level compounds are AA = A006450, AB = A007821, BA = A078782, BB = A102615. The 3-level compounds AAA, AAB, ..., BBB are A038580, A049078, A270792, A102617, A270794, A270796, A102216.

Programs

  • Maple
    # For Maple code for the prime/nonprime compound sequences (listed in cross-references) see A003622.  - N. J. A. Sloane, Mar 30 2016

A270796 The prime/nonprime compound sequence BBA.

Original entry on oeis.org

8, 10, 15, 20, 27, 32, 38, 40, 49, 58, 63, 72, 78, 82, 88, 99, 110, 114, 121, 125, 129, 140, 146, 155, 166, 172, 175, 183, 185, 189, 212, 217, 225, 230, 245, 248, 258, 265, 272, 279, 289, 292, 306, 309, 315, 319, 334, 355, 360, 362, 368, 375, 377, 393, 402, 408, 416, 420, 427, 435, 438, 452, 473, 478, 482, 486, 507
Offset: 1

Views

Author

N. J. A. Sloane, Mar 30 2016

Keywords

Crossrefs

Let A = primes A000040, B = nonprimes A018252. The 2-level compounds are AA = A006450, AB = A007821, BA = A078782, BB = A102615. The 3-level compounds AAA, AAB, ..., BBB are A038580, A049078, A270792, A102617, A270794, A270796, A102216.

Programs

  • Maple
    # For Maple code for the prime/nonprime compound sequences (listed in cross-references) see A003622.  - N. J. A. Sloane, Mar 30 2016

A102217 3-Suzanne numbers; composite multiples of 3 whose sum of prime factors with multiplicity is a multiple of 3.

Original entry on oeis.org

9, 24, 27, 42, 60, 72, 78, 81, 105, 114, 126, 132, 150, 180, 186, 192, 195, 204, 216, 222, 231, 234, 243, 258, 276, 285, 315, 330, 336, 342, 348, 357, 366, 375, 378, 396, 402, 429, 438, 450, 465, 474, 480, 483, 492, 510, 540, 555, 558, 564, 576, 582, 585
Offset: 1

Views

Author

Eric W. Weisstein, Dec 30 2004

Keywords

Comments

Composite numbers k such that the sum of digits of k (A007953) and the sum of sums of digits of the prime factors of k (taken with multiplicity, A118503) are both divisible by 3. - Amiram Eldar, Apr 23 2021
The new secondary definition is equal to the original because taking the decimal digit sum preserves congruence modulo 3. This is a multiplicative semigroup: if m and n are in the sequence, then so is m*n. - Antti Karttunen, Jun 08 2024

Examples

			From _Antti Karttunen_, Jun 08 2024: (Start)
42 = 2*3*7 is a term as it is a multiple of 3, and also 2+3+7 = 12 is a multiple of 3.
60 = 2*2*3*5 is a term is it is a multiple of 3, and also 2+2+3+5 = 12 is a multiple of 3.
(End)
		

References

  • József Sándor and Borislav Crstici, Handbook of Number theory II, Kluwer Academic Publishers, 2004, Chapter 4, p. 384.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, 2nd ed., Cambridge University Press, 2005, p. 93.

Crossrefs

Subsequence of A177927.
Intersection of A008585 and A289142 without the initial 3.
Positions of multiples of 3 in A082299, after A082299(3).

Programs

  • Mathematica
    s[n_] := Plus @@ IntegerDigits[n]; f[p_, e_] := e*s[p]; sp[n_] := Plus @@ f @@@ FactorInteger[n]; suz3Q[n_] := CompositeQ[n] && And @@ Divisible[{s[n], sp[n]}, 3]; Select[Range[600], suz3Q] (* Amiram Eldar, Apr 23 2021 *)
  • PARI
    isA102217(n) = if(n<=3 || (n%3), 0, my(f=factor(n)); 0==(sum(i=1, #f~, f[i, 2]*sumdigits(f[i, 1]))%3)); \\ Antti Karttunen, Jun 08 2024
    
  • PARI
    isA102217(n) = (n>3 && !(n%3) && A373371(n)); \\ Antti Karttunen, Jun 08 2024

Formula

a(n) = 3*A289142(1+n). - Antti Karttunen, Jun 08 2024

Extensions

Alternative definition added and keyword:base removed by Antti Karttunen, Jun 08 2024

A102616 Nonprime numbers of order 3.

Original entry on oeis.org

1, 14, 16, 22, 24, 25, 30, 33, 35, 36, 39, 44, 46, 48, 50, 51, 54, 55, 56, 62, 64, 66, 68, 69, 70, 75, 76, 77, 80, 85, 86, 87, 90, 92, 93, 94, 96, 100, 102, 104, 105, 108, 111, 115, 116, 117, 118, 120, 122, 123, 124, 126, 130, 132, 134, 136, 138, 142, 144, 145, 148, 150
Offset: 1

Views

Author

Cino Hilliard, Jan 31 2005

Keywords

Comments

nps(n,1) -> list nonprime(n) or the sequence of nonprime numbers. nps(n,2) -> list nonprime(nonprime(n)) or nps of order 2. nps(n,3) -> list nonprime(nonprime(nonprime(n))) or npcs of order 3 ..... The order is the number of nestings - 1.

Examples

			Nonprime(2) = 4.
Nonprime(4) = 8.
Nonprime(8) = 14, the 2nd entry.
		

Crossrefs

Let A = primes A000040, B = nonprimes A018252. The 2-level compounds are AA = A006450, AB = A007821, BA = A078782, BB = A102615. The 3-level compounds AAA, AAB, ..., BBB are A038580, A049078, A270792, A102617, A270794, A270796, A102216.

Programs

  • Maple
    # For Maple code for the prime/nonprime compound sequences (listed in cross-references) see A003622. - N. J. A. Sloane, Mar 30 2016
  • Mathematica
    nonPrime[n_] := FixedPoint[n + PrimePi[ # ] &, n]; Nest[ nonPrime, Range[62], 3] (* Robert G. Wilson v, Feb 04 2005 *)
  • PARI
    \\ We perform nesting(s) with a loop.
    cics(n,m) = { local(x,y,z); for(x=1,n, z=x; for(y=1,m+1, z=nonprime(z); ); print1(z",") ) }
    nonprime(n) = { local(c,x); c=1; x=0; while(c <= n, x++; if(!isprime(x),c++); ); return(x) }

Extensions

Edited by Robert G. Wilson v, Feb 04 2005

A270795 The prime/nonprime compound sequence BAB.

Original entry on oeis.org

4, 12, 21, 28, 34, 42, 52, 60, 65, 74, 84, 95, 98, 106, 119, 128, 133, 135, 141, 147, 170, 177, 180, 192, 195, 209, 214, 220, 231, 246, 250, 253, 284, 288, 290, 295, 301, 316, 323, 329, 336, 339, 351, 365, 382, 387, 390, 394, 417, 429, 432, 445, 462, 470, 474, 481, 490, 505, 516, 518, 532, 538, 543, 550, 559, 566
Offset: 1

Views

Author

N. J. A. Sloane, Mar 30 2016

Keywords

Crossrefs

Let A = primes A000040, B = nonprimes A018252. The 2-level compounds are AA = A006450, AB = A007821, BA = A078782, BB = A102615. The 3-level compounds AAA, AAB, ..., BBB are A038580, A049078, A270792, A102617, A270794, A270796, A102216.

Programs

  • Maple
    # For Maple code for the prime/nonprime compound sequences (listed in cross-references) see A003622.  - N. J. A. Sloane, Mar 30 2016

A102218 2-Monica numbers.

Original entry on oeis.org

4, 8, 10, 12, 14, 15, 22, 26, 27, 35, 42, 44, 45, 54, 56, 58, 60, 62, 63, 64, 65, 68, 78, 84, 85, 88, 90, 92, 94, 96, 99, 102, 108, 111, 118, 119, 121, 122, 123, 126, 129, 133, 136, 138, 141, 143, 145, 152, 155, 158, 159, 160, 161, 164, 165, 166, 169, 174, 175
Offset: 1

Views

Author

Eric W. Weisstein, Dec 30 2004

Keywords

Comments

Composite numbers k such that the difference between the sum of digits of k (A007953) and the sum of sums of digits of the prime factors of k (taken with multiplicity, A118503) is even. - Amiram Eldar, Apr 23 2021

References

  • József Sándor and Borislav Crstici, Handbook of Number theory II, Kluwer Academic Publishers, 2004, Chapter 4, p. 384.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, 2nd ed., Cambridge University Press, 2005, p. 93.

Crossrefs

Programs

  • Mathematica
    s[n_] := Plus @@ IntegerDigits[n]; f[p_, e_] := e*s[p]; sp[n_] := Plus @@ f @@@ FactorInteger[n]; mon2Q[n_] := CompositeQ[n] && EvenQ[s[n] - sp[n]]; Select[Range[200], mon2Q] (* Amiram Eldar, Apr 23 2021 *)
Showing 1-10 of 10 results.