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

A065134 Remainder when n is divided by the number of primes not exceeding n.

Original entry on oeis.org

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

Views

Author

Labos Elemer, Oct 15 2001

Keywords

Comments

Also remainder when the number of nonprimes is divided by the number of primes (not exceeding n).

Examples

			n = 2: Pi[2] = 1,Mod[1,1] = 0, the first term = a(2) = 0; n = 100: Pi[100] = 25, Mod[100,25] = 0 = a(100); n = 20: Pi[20] = 8, Mod[20,8] = 4 = a(20).
		

Crossrefs

Programs

  • Mathematica
    Table[Last@ QuotientRemainder[n, PrimePi[n]], {n, 2, 91}] (* Michael De Vlieger, Jul 04 2016 *)
  • PARI
    { for (n=2, 1000, write("b065134.txt", n, " ", n%primepi(n)) ) } \\ Harry J. Smith, Oct 11 2009

Formula

a(n) = n (mod pi(n)).

Extensions

Term a(1) removed so OFFSET changed from 1,5 to 2,4 by Harry J. Smith, Oct 11 2009
Since OFFSET is 2,4; Term a(1) removed and a(91) added by Harry J. Smith, Oct 11 2009

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

A065864 Remainder when n is divided by the number of nonprimes not exceeding n.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 1, 0, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 17, 17, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 21, 21, 21, 21, 21, 21
Offset: 1

Views

Author

Labos Elemer, Nov 26 2001

Keywords

Examples

			For n=100, pi(100)=25, so a(100) = 100 mod (100-25) = 25.
		

Crossrefs

Programs

  • Mathematica
    Table[Mod[n, n - PrimePi@ n], {n, 78}] (* or *)
    Table[Mod[n, Count[Range@ n, k_ /; ! PrimeQ@ k]], {n, 78}] (* Michael De Vlieger, Jan 01 2017 *)
  • PARI
    { for (n = 1, 1000, a=n%(n - primepi(n)); write("b065864.txt", n, " ", a) ) } \\ Harry J. Smith, Nov 02 2009

Formula

a(n) = n mod (n-pi(n)) = n mod (n-A000720(n)) = n mod A062298(n).

A175251 Composites (A002808) with nonprime (A018252) subscripts.

Original entry on oeis.org

4, 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
Offset: 1

Views

Author

Jaroslav Krizek, Mar 13 2010

Keywords

Comments

a(n) = composite(nonprime(n)) = A002808(A018252(n)). a(n) U A065858(n) = A002808(n), a(n+1) U A022449(n) = A002808(n) for n >= 1. a(1) = 4, a(n) = A050435(n-1) = composites (A002808) with composite (A002808) subscripts for n >=2.

Examples

			a(5) = 16 because a(5) = c(b(5)) = c(9) = 16, c = composite, b = nonprime.
		

A065863 Remainder when n-th prime is divided by the number of nonprimes not exceeding n.

Original entry on oeis.org

0, 0, 0, 1, 1, 1, 2, 3, 3, 5, 1, 2, 6, 3, 2, 3, 9, 6, 1, 11, 8, 9, 13, 14, 1, 16, 13, 12, 14, 13, 7, 5, 5, 1, 5, 1, 7, 7, 5, 5, 11, 7, 17, 13, 11, 7, 19, 25, 23, 19, 17, 17, 19, 23, 23, 23, 23, 19, 25, 23, 25, 29, 37, 35, 31, 29, 43, 43, 47, 43, 47, 47, 3, 2, 1, 53, 53, 55, 2, 3, 6, 1, 11, 6
Offset: 1

Views

Author

Labos Elemer, Nov 26 2001

Keywords

Examples

			For n=25, prime(25)=97, n - pi(n) = 25 - 9 = 16, a(25)=1 because 97 = 6*16 + 1.
		

Crossrefs

Programs

  • Mathematica
    Table[Mod[Prime[n],n-PrimePi[n]],{n,90}] (* Harvey P. Dale, Aug 04 2015 *)
  • PARI
    a(n) = { prime(n)%(n - primepi(n)) } \\ Harry J. Smith, Nov 02 2009

Formula

a(n) = prime(n) mod (n - pi(n)) = A000040(n) mod A062298(n).

A065862 Remainder when n-th composite number is divided by the number of nonprimes not exceeding n.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 2, 3, 1, 0, 2, 0, 1, 0, 7, 6, 7, 6, 8, 8, 7, 6, 7, 6, 6, 5, 4, 4, 6, 5, 6, 6, 5, 4, 3, 2, 4, 3, 2, 1, 2, 2, 4, 3, 2, 1, 2, 2, 1, 0, 0, 0, 1, 0, 38, 38, 39, 39, 40, 41, 42, 42, 42, 42, 43, 43, 44, 44, 44, 44, 45, 46, 47, 47, 48, 49, 49, 49, 51, 52, 52, 52, 54, 54, 54, 54, 54
Offset: 1

Views

Author

Labos Elemer, Nov 26 2001

Keywords

Crossrefs

Programs

  • Mathematica
    Module[{nn=150,cmps,len},cmps=Select[Range[nn],CompositeQ];len=Length[ cmps];Mod[#[[1]],#[[2]]-PrimePi[#[[2]]]]&/@Thread[{cmps,Range[len]}]] (* Harvey P. Dale, Feb 21 2020 *)
  • PARI
    Composite(n) = { local(k); k=n + primepi(n) + 1; while (k != n + primepi(k) + 1, k = n + primepi(k) + 1); return(k) } { for (n = 1, 1000, a=Composite(n)%(n - primepi(n)); write("b065862.txt", n, " ", a) ) } \\ Harry J. Smith, Nov 02 2009

Formula

a(n) = c(n) mod (n - pi(n)) = A002808(n) mod (n - A000720(n)) = A002808(n) mod A062298(n).

A145351 Prime-indexed composites k such that lpf(k) + gpf(k) is a prime.

Original entry on oeis.org

6, 10, 20, 22, 30, 44, 54, 58, 66, 82, 96, 108, 120, 136, 142, 144, 204, 232, 324, 330, 340, 352, 384, 464, 492, 544, 596, 616, 704, 738, 750, 792, 870, 894, 918, 960, 990, 1062, 1234, 1312, 1318, 1326, 1498, 1534, 1540, 1566, 1576, 1632, 1694, 1700, 1722
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jan 04 2009

Keywords

Examples

			6 is a term because it is the 2nd composite number, 6=2*3, and 2+3=5 is prime;
10 is a term because it is the 5th composite number, 10=2*5, and 2+5=7 is prime;
22 is a term because it is the 13th composite number, 22=2*11, and 2+11=13 is prime;
44 is a term because it is the 29th composite number, 44=2*2*11, and 2+11=13 is prime.
		

Crossrefs

Cf. A000040, A002808, A020639 (lpf), A006530 (gpf).

Programs

  • Maple
    A020639 := proc(n) numtheory[factorset](n) ; min(op(%)) ; end proc:
    A006530 := proc(n) numtheory[factorset](n) ; max(op(%)) ; end proc:
    A002808 := proc(n) if n = 1 then 4; else for a from procname(n-1)+1 do if not isprime(a) then return a; end if; end do: end if; end proc:
    A065858 := proc(n) A002808(ithprime(n)) ; end proc:
    A145351 := proc(n) c := A065858(n) ; if isprime(A020639(c) + A006530(c)) then printf("%d,",c) ; end if; end proc:
    seq(A145351(n),n=1..400) ; # R. J. Mathar, May 01 2010
  • Mathematica
    pfiQ[n_]:=Module[{f=FactorInteger[n]},PrimeQ[f[[1,1]]+f[[-1,1]]]]; Module[ {nn=2000,c},c=Select[ Range[nn],CompositeQ];Select[ Table[ Take[c,{n}][[1]],{n,Prime[Range[PrimePi[Length[c]]]]}],pfiQ]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, May 18 2019 *)

Extensions

Corrected (inserted 20 from n=5, 30 from n=8, removed 200) and extended beyond 204 by R. J. Mathar, May 01 2010
Edited by Jon E. Schoenfield, Feb 07 2019

A177997 p and A002808(p)/2 are both prime.

Original entry on oeis.org

2, 5, 7, 13, 31, 41, 43, 59, 101, 107, 127, 137, 149, 199, 239, 277, 359, 389, 479, 613, 743, 757, 809, 829, 937, 991, 1031, 1103, 1439, 1487, 1499, 1847, 1877, 2011, 2083, 2179, 2609, 2663, 2711, 2741, 2749, 2857, 2909, 3329, 3559, 3623, 3643, 3697, 3823
Offset: 1

Views

Author

Juri-Stepan Gerasimov, May 17 2010, May 23 2010

Keywords

Comments

Primes p such that composite(p) is an even semiprime.

Examples

			a(1)=2 because 2=prime and composite(2)/2=6/2=3=prime.
		

Crossrefs

Programs

  • Maple
    P,C:= selectremove(isprime, [$2..10000]):
    select(t -> t <= nops(C) and C[t]::even and isprime(C[t]/2), P); # Robert Israel, Mar 20 2018
  • PARI
    c=[]; for(n=2, 10000, if(!isprime(n), c=concat(c, n))); c; \\ The composites
    s=[]; forprime(p=2, #c, if(c[p]%2==0 && isprime(c[p]\2), s=concat(s, p))); s \\ Colin Barker, Jun 28 2014

Extensions

Corrected by D. S. McNeil and R. J. Mathar, May 23 2010

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