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

A050435 a(n) = composite(composite(n)), where composite = A002808, composite numbers.

Original entry on oeis.org

9, 12, 15, 16, 18, 21, 24, 25, 26, 28, 32, 33, 34, 36, 38, 39, 40, 42, 45, 48, 49, 50, 51, 52, 55, 56, 57, 60, 63, 64, 65, 68, 69, 70, 72, 74, 76, 77, 78, 80, 81, 84, 86, 87, 88, 90, 91, 93, 94, 95, 98, 100, 102, 104, 105, 106, 110, 111, 112, 115, 116, 117, 118, 119
Offset: 1

Views

Author

Michael Lugo (mlugo(AT)thelabelguy.com), Dec 22 1999

Keywords

Comments

Second-order composite numbers.
Composites (A002808) with composite (A002808) subscripts. a(n) U A022449(n) = A002808(n). Subsequence of A175251 (composites (A002808) with nonprime (A018252) subscripts), a(n) = A175251(n+1) for n >= 1. - Jaroslav Krizek, Mar 14 2010

Examples

			The 2nd composite number is 6 and the 6th composite number is 12, so a(2) = 12. a(100) = A002808(A002808(100)) = A002808(133) = 174.
		

Crossrefs

Programs

  • Haskell
    a050435 = a002808 . a002808
    a050435_list = map a002808 a002808_list
    -- Reinhard Zumkeller, Jan 12 2013
    
  • Mathematica
    Select[ Range[ 6, 150 ], ! PrimeQ[ # ] && ! PrimeQ[ # - PrimePi[ # ] - 1 ] & ]
    With[{cmps=Select[Range[200],CompositeQ]},Table[cmps[[cmps[[n]]]],{n,70}]] (* Harvey P. Dale, Feb 18 2018 *)
  • PARI
    composite(n)=my(k=-1); while(-n + n += -k + k=primepi(n), ); n \\ M. F. Hasler
    a(n)=composite(composite(n)) \\ Charles R Greathouse IV, Jun 25 2017
    
  • Python
    from sympy import composite
    def a(n): return composite(composite(n))
    print([a(n) for n in range(1, 65)]) # Michael S. Branicky, Sep 12 2021

Formula

Let C(n) be the n-th composite number, with C(1)=4. Then these are numbers C(C(n)).
a(n) = n + 2n/log n + O(n/log^2 n). - Charles R Greathouse IV, Jun 25 2017

Extensions

More terms from Robert G. Wilson v, Dec 20 2000

A065858 m-th composite number c(m) = A002808(m), where m is the n-th prime number: a(n) = A002808(A000040(n)).

Original entry on oeis.org

6, 8, 10, 14, 20, 22, 27, 30, 35, 44, 46, 54, 58, 62, 66, 75, 82, 85, 92, 96, 99, 108, 114, 120, 129, 134, 136, 142, 144, 148, 166, 171, 178, 182, 194, 196, 204, 210, 215, 221, 230, 232, 245, 247, 252, 254, 268, 285, 289, 291, 296, 302, 304, 318, 324, 330, 338
Offset: 1

Views

Author

Labos Elemer, Nov 26 2001

Keywords

Comments

Composites (A002808) with prime (A000040) subscripts. a(n) U A175251(n) = A002808(n). Subsequence of A022449 (composites (A002808) with noncomposite (A008578) subscripts), a(n) = A022449(n+1). - Jaroslav Krizek, Mar 14 2010

Crossrefs

Programs

  • Maple
    P,C:= selectremove(isprime,[seq(i,i=2..10^3)]):
    seq(C[P[i]],i=1..100); # Robert Israel, Mar 09 2025
  • Mathematica
    Composite[n_] := FixedPoint[n + PrimePi[#] + 1 & , n + PrimePi[n] + 1];
    a[n_] := Composite[Prime[n]];
    Array[a, 100] (* Jean-François Alcover, Jan 26 2018, after Robert G. Wilson v *)

A022449 c(p(n)) where p(k) is k-th prime including p(1)=1 and c(k) is k-th composite number.

Original entry on oeis.org

4, 6, 8, 10, 14, 20, 22, 27, 30, 35, 44, 46, 54, 58, 62, 66, 75, 82, 85, 92, 96, 99, 108, 114, 120, 129, 134, 136, 142, 144, 148, 166, 171, 178, 182, 194, 196, 204, 210, 215, 221, 230, 232, 245, 247, 252, 254, 268, 285, 289, 291, 296, 302, 304, 318
Offset: 1

Views

Author

Keywords

Comments

a(n) U A050435(n) = A002808(n), a(n+1) U A175251(n) = A002808(n) for n >= 1. a(n) = A065858(n-1) = composites (A002808) with prime (A000040) subscripts for n >=2. [From Jaroslav Krizek, Mar 13 2010]

Examples

			a(5) = 14 because a(5) = composite(noncomposite(5)) = composite(7) =14. _Jaroslav Krizek_, Mar 13 2010
		

References

  • C. Kimberling, Fractal sequences and interspersions, Ars Combinatoria, vol. 45 p 157 1997.

Crossrefs

A065858 with a leading 4.

Programs

Formula

a(n) = A002808(A008578(n)). - Jaroslav Krizek, Mar 13 2010

Extensions

Definition corrected by Christopher M. Tomaszewski (cmt1288(AT)comcast.net), Mar 30 2005

A260621 Let b(k, n) = number obtained when the map x->A002808(x) is applied k times to n; a(n) is the smallest k such that b(k, n) + 1 is prime.

Original entry on oeis.org

1, 1, 12, 2, 1, 1, 3, 11, 1, 1, 7, 9, 1, 2, 10, 4, 2, 1, 1, 6, 8, 3, 3, 1, 9, 3, 1, 1, 18, 3, 1, 5, 7, 2, 2, 1, 4, 8, 2, 14, 1, 1, 6, 17, 2, 6, 1, 4, 6, 1, 1, 2, 2, 3, 7, 1, 13, 6, 1, 4, 16, 5, 16, 1, 5, 31, 35, 3, 5, 2, 1, 2, 3, 1, 1, 2, 6, 1, 1, 12, 5, 1, 2
Offset: 1

Views

Author

Matthew Campbell, Sep 25 2015

Keywords

Comments

a(n) is also the smallest value of k at which b(k, n+1) - b(k, n) > 1.

Examples

			When n = 3, writing Composite(x) for A002808(x):
1. Composite(3) = 8. 8 + 1 = 9 = 3^2. 9 is not prime.
2. Composite(8) = 15. 15 + 1 = 16 = 2^4. 16 is not prime.
3. Composite(15) = 25. 25 + 1 = 26 = 2*13. 26 is not prime.
4. Composite(25) = 38. 38 + 1 = 39 = 3*13. 39 is not prime.
5. Composite(38) = 55. 55 + 1 = 56 = 2^3*7. 56 is not prime.
6. Composite(55) = 77. 77 + 1 = 78 = 2*3*13. 78 is not prime.
7. Composite(77) = 105. 105 + 1 = 106 = 2*53. 106 is not prime.
8. Composite(105) = 140. 140 + 1 = 141 = 3*47. 141 is not prime.
9. Composite(140) = 183. 183 + 1 = 184 = 2^3*23. 184 is not prime.
10. Composite(183) = 235. 235 + 1 = 236 = 2^2*59. 236 is not prime.
11. Composite(235) = 298. 298 + 1 = 299 = 13*23. 299 is not prime.
12. Composite(298) = 372. 372 + 1 = 373. 373 is prime.
--------------------------------------------------------------
Since the composite function was applied 12 times, a(3)=12.
		

Crossrefs

Primes and nonprimes: A000040, A002808, A008578, A018252.
a(1) = p, a(n+1) = a(n)-th composite number: A006508, A022450, A022451, A025010, A025011, A059407, A059408.
Composites with order n > 1: A050435, A050436, A050438, A050439, A050440.
Composites with order n = b, n >= 1: A022449.
Composites with prime subscripts: A065858.
Composites without prime subscripts: A175251.
Order of compositeness: A059981, A236536.
Prime(n)-1: A006093.

Programs

  • Mathematica
    c = Select[Range[10^5], CompositeQ]; Table[k = 1; While[! PrimeQ[Nest[c[[#]] &, n, k] + 1], k++]; k, {n, 120}] (* Michael De Vlieger, Jul 15 2016 *)

Extensions

Terms from a(12) onward from Jon E. Schoenfield, Sep 27 2015
Showing 1-4 of 4 results.