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

A161671 a(n) = prime(n) - A141468(n).

Original entry on oeis.org

2, 2, 1, 1, 3, 4, 7, 7, 9, 14, 15, 19, 21, 22, 25, 29, 34, 35, 40, 43, 43, 47, 50, 55, 62, 65, 65, 68, 69, 71, 83, 86, 91, 91, 100, 101, 106, 111, 113, 118, 123, 124, 133, 133, 135, 136, 147, 158, 161, 161, 164, 169, 169, 177, 182, 187, 192, 193, 197, 200, 201, 209
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jun 16 2009, Dec 03 2009

Keywords

Examples

			2(=2-0), 2(=3-1), 1(=5-4), 1(=7-6), 3(=11-8), 4(=13-9), 7(=17-10), 7(=19-12), 9(=23-14), 14(=29-15), etc.
		

Crossrefs

Programs

Formula

a(n) = A000040(n) - A141468(n).
a(n+2) = A168563(n).
a(n) = A000040(n) - A018252(n-1), if n >= 2. - Omar E. Pol, Oct 21 2011
a(n) ~ n log n. - Charles R Greathouse IV, Dec 21 2011

Extensions

Edited by N. J. A. Sloane, Jun 30 2009
207 replaced with 209 by R. J. Mathar, Oct 04 2009
Edited by Omar E. Pol, Oct 21 2011

A161753 Squares of nonprime numbers A141468.

Original entry on oeis.org

0, 1, 16, 36, 64, 81, 100, 144, 196, 225, 256, 324, 400, 441, 484, 576, 625, 676, 729, 784, 900, 1024, 1089, 1156, 1225, 1296, 1444, 1521, 1600, 1764, 1936, 2025, 2116, 2304, 2401, 2500, 2601, 2704, 2916, 3025, 3136, 3249, 3364, 3600, 3844, 3969, 4096
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jun 18 2009

Keywords

Comments

Essentially the same as A062312: a(1)=0, a(n)=A062312(n-1) for n>=2. - R. J. Mathar, Sep 11 2012

Examples

			0=0^2, 1=1^2, 16=4^2, 36=6^2, etc.
		

Crossrefs

Programs

  • Mathematica
    With[{nn=100},Complement[Range[0,nn],Prime[Range[PrimePi[nn]]]]^2] (* Harvey P. Dale, Jul 04 2013 *)

Extensions

Corrected and edited by Omar E. Pol, Jun 29 2009

A174620 a(n) = 2^A141468(n) mod prime(n), where A141468(n) is the n-th nonnegative nonprime.

Original entry on oeis.org

1, 2, 1, 1, 3, 5, 4, 11, 8, 27, 2, 36, 1, 42, 24, 13, 11, 19, 45, 5, 8, 50, 71, 2, 86, 78, 15, 74, 16, 112, 4, 68, 14, 106, 66, 32, 79, 26, 25, 18, 76, 6, 78, 150, 163, 63, 69, 98, 189, 17, 184, 40, 1, 125, 249, 187, 229, 69, 169, 81, 264, 172, 18, 209, 114, 277, 1, 128, 46, 21
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Nov 29 2010

Keywords

Examples

			a(14) = 12 because (2^A141468(14) mod prime(14)) = (2097152 mod 43) = 12.
		

Crossrefs

Main diagonal of A177416.

Programs

  • Mathematica
    MapIndexed[PowerMod[2, #, Prime[First[#2]]] &, Join[{0, 1}, Select[Range[100], CompositeQ]]] (* Paolo Xausa, Jul 01 2024 *)
  • PARI
    c=-1; forprime(p=1,999,while(isprime(c++),);print1(lift( Mod(2,p)^c )", ")) \\ M. F. Hasler, Nov 29 2010

A166039 Sums of three consecutive nonprimes A141468.

Original entry on oeis.org

5, 11, 18, 23, 27, 31, 36, 41, 45, 49, 54, 59, 63, 67, 71, 75, 78, 81, 85, 90, 95, 99, 102, 105, 109, 113, 117, 121, 126, 131, 135, 139, 143, 147, 150, 153, 157, 161, 165, 168, 171, 175, 180, 185, 189, 192, 195, 199, 203, 207, 211, 216, 221, 225, 228, 231, 235
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Oct 05 2009

Keywords

Examples

			a(1) = 0 + 1 + 4 =  5;
a(2) = 1 + 4 + 6 = 11;
a(3) = 4 + 6 + 8 = 18.
		

Crossrefs

Programs

  • Maple
    A002808 := proc(n) option remember; if n = 1 then 4; else for a from procname(n-1)+1 do if not isprime(a) then return a; fi; od: fi; end: A141468 := proc(n) if n <= 2 then n-1 ; else A002808(n-2) ; fi; end: A166039 := proc(n) add(A141468(j),j=n..n+2) ; end: seq(A166039(n),n=1..120) ; # R. J. Mathar, Oct 10 2009
  • Mathematica
    With[{nn=100},Total/@Partition[Complement[Range[0,nn],Prime[ Range[ PrimePi[ nn]]]],3,1]] (* Harvey P. Dale, Aug 05 2015 *)

A167915 Primes which are the sums of two consecutive nonprimes (A141468).

Original entry on oeis.org

5, 17, 19, 29, 31, 41, 43, 53, 67, 71, 79, 89, 97, 101, 103, 109, 113, 127, 131, 137, 139, 149, 151, 163, 173, 181, 191, 197, 199, 211, 223, 229, 233, 239, 241, 251, 257, 269, 271, 281, 283, 293, 307, 311, 317, 331, 337, 349, 353, 367, 373, 379, 389, 401, 409
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Nov 15 2009

Keywords

Comments

Five together with primes that are the sum of two consecutive composite numbers.

Examples

			a(1)=1+4=5, a(2)=8+9=17.
		

Crossrefs

Programs

  • Magma
    [2*n+1: n in [1..300] | (not IsPrime(n) eq not IsPrime(n+1)) and IsPrime(2*n+1)]; // G. C. Greubel, Nov 10 2023
    
  • Mathematica
    2*Select[Range[300], !PrimeQ[#] == !PrimeQ[#+1] && PrimeQ[2*#+1] &] + 1 (* G. C. Greubel, Jul 01 2016; Nov 10 2023 *)
  • SageMath
    [2*n+1 for n in (1..300) if  (not is_prime(n)) - (not is_prime(n+1)) == 0 and is_prime(2*n+1)] # G. C. Greubel, Nov 10 2023

Formula

a(n+1) = A060254(n) = A176902(n+1). - Juri-Stepan Gerasimov, Apr 28 2010

Extensions

Typo corrected and terms checked by D. S. McNeil, Nov 17 2010

A141559 Primes of form (p(n)-r(n)), where A141468(n)=r(n)=n-th nonprime and p(n)=n-th prime.

Original entry on oeis.org

2, 2, 3, 7, 7, 19, 29, 43, 43, 47, 71, 83, 101, 113, 193, 197, 229, 241, 271, 283, 293, 311, 311, 347, 383, 439, 457, 463, 491, 491, 499, 523, 587, 619, 643, 683, 733, 797, 827, 827, 857, 863, 919, 991, 1021, 1031, 1091, 1151, 1187, 1289, 1367, 1367, 1549, 1567
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Aug 14 2008

Keywords

Examples

			If n=1, then p(1)-r(1)=2-0=2=a(1).
If n=2, then p(2)-r(2)=3-1=2=a(2).
If n=3, then p(3)-r(3)=5-4=1 (nonprime).
If n=4, then p(4)-r(4)=7-6=1 (nonprime).
If n=5, then p(5)-r(5)=11-8=3=a(3).
If n=6, then p(6)-r(6)=13-9=4 (composite).
If n=7, then p(7)-r(7)=17-10=7=a(4).
If n=8, then p(8)-r(8)=19-12=7=a(5).
If n=9, then p(9)-r(9)=23-14=9 (composite).
If n=10, then=p(10)-r(10)=29-15=14 (composite).
If n=11, then p(11)-r(11)=31-16=15 (composite).
If n=12, then p(12)-r(12)=37--18=19=a(6).
If n=13, then p(13)-r(13)=41-20=21 (composite).
If n=14, then p(14)-r(14)=43-21=22 (composite).
If n=15, then p(15)-r(15)=47-22=25 (composite).
If n=16, then p(16)-r(16)=53-24=29=a(7), etc.
		

Crossrefs

Programs

  • Mathematica
    Block[{nn = 2000, p, r}, p = Prime@ Range@ PrimePi@ nn; r = Complement[Range[0, nn], p]; Select[Array[p[[#]] - r[[#]] &, Min[Length /@ {p, r}]], PrimeQ]] (* Michael De Vlieger, May 21 2019 *)

Extensions

Edited and extended by Ray Chandler, Aug 19 2008

A166037 Numbers that are the sum of 2 successive nonprimes A141468.

Original entry on oeis.org

1, 5, 10, 14, 17, 19, 22, 26, 29, 31, 34, 38, 41, 43, 46, 49, 51, 53, 55, 58, 62, 65, 67, 69, 71, 74, 77, 79, 82, 86, 89, 91, 94, 97, 99, 101, 103, 106, 109, 111, 113, 115, 118, 122, 125, 127, 129, 131, 134, 137, 139, 142, 146, 149, 151, 153, 155, 158, 161, 163, 166
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Oct 05 2009

Keywords

Comments

a(n) = (n-1)-th nonprimes + (n-1)-th composites for n >= 2. a(n) = A018252(n-1) + A002808(n-1) for n >= 2. - Jaroslav Krizek, Dec 13 2009

Examples

			a(1) = 0 + 1 =  1;
a(2) = 1 + 4 =  5;
a(3) = 4 + 6 = 11.
		

Crossrefs

Cf. A167915 (primes that are the sums of two consecutive composites).

Programs

  • Maple
    A002808 := proc(n) option remember; if n = 1 then 4; else for a from procname(n-1)+1 do if not isprime(a) then return a; fi; od: fi; end: A141468 := proc(n) if n <= 2 then n-1 ; else A002808(n-2) ; fi; end: A166037 := proc(n) A141468(n)+A141468(n+1) ; end: seq(A166037(n),n=1..120) ; # R. J. Mathar, Oct 10 2009
  • Mathematica
    With[{nn=100},Join[{1},Total/@Partition[Complement[Range[nn],Prime[ Range[ PrimePi[ nn]]]],2,1]]] (* Harvey P. Dale, Aug 03 2014 *)

A179899 Integers of the form A179896(n)/A141468(n+1).

Original entry on oeis.org

0, 12, 21, 30, 36, 39, 48, 51, 57, 66, 72, 75, 81, 84, 93, 96, 102, 111, 114, 120, 126, 129, 135, 138, 141, 147, 156, 165, 171, 174, 177, 180, 183, 186, 192, 198, 201, 210, 213, 216, 219, 228, 231, 237, 240, 246, 252, 255, 261, 264, 273, 276, 279, 282, 291
Offset: 1

Views

Author

Odimar Fabeny, Jul 31 2010

Keywords

Examples

			0 = 0/1, 12 = 108/9, 21 = 315/15, 30 = 630/21, 36 = 900/25 and so on.
		

Crossrefs

Programs

  • Maple
    ithnonprime := proc(n)local k: option remember: if(n=1)then return 1: else k := procname(n-1)+1: while true do if(not isprime(k))then return k fi: k:=k+1: od: fi: end: A179899ind := proc(n) option remember: local k: if(n=1)then return 1:fi: for k from procname(n-1)+1 do if(ithnonprime(k) mod 2 <> 0)then return k: fi: od: end: A179899 := proc(n) return 3*(ithnonprime(A179899ind(n))-1)/2: end: seq(A179899(n),n=1..55); # Nathaniel Johnston, May 05 2011

Extensions

More terms from Odimar Fabeny, Aug 12 2010
Definition rephrased by R. J. Mathar, Sep 01 2010

A102885 Index of n in the primes A000040 or nonprimes A141468.

Original entry on oeis.org

1, 2, 1, 2, 3, 3, 4, 4, 5, 6, 7, 5, 8, 6, 9, 10, 11, 7, 12, 8, 13, 14, 15, 9, 16, 17, 18, 19, 20, 10, 21, 11, 22, 23, 24, 25, 26, 12, 27, 28, 29, 13, 30, 14, 31, 32, 33, 15, 34, 35, 36, 37, 38, 16, 39, 40, 41, 42, 43, 17, 44, 18, 45, 46, 47, 48, 49, 19, 50, 51, 52, 20, 53, 21, 54
Offset: 0

Views

Author

Juri-Stepan Gerasimov, Aug 17 2008

Keywords

Comments

The nonnegative numbers n occur exactly once in either A000040 or A141468. The sequence lists the corresponding index. It is a permutation of A008619.

Crossrefs

Programs

  • Mathematica
    Module[{nn=80,pr,np},pr=Prime[Range[PrimePi[nn]]];np=Complement[ Range[ 0,nn],pr];Table[If[PrimeQ[n],Position[pr,n],Position[np,n]],{n,0,nn}]]//Flatten (* Harvey P. Dale, Sep 10 2022 *)

Formula

A141468(a(n))=n or A000040(a(n))=n.

Extensions

Edited by R. J. Mathar, Aug 19 2008

A144551 a(n) = nonprime(n)*nonprime(n+1)/2, where nonprime(n) = A141468(n).

Original entry on oeis.org

0, 2, 12, 24, 36, 45, 60, 84, 105, 120, 144, 180, 210, 231, 264, 300, 325, 351, 378, 420, 480, 528, 561, 595, 630, 684, 741, 780, 840, 924, 990, 1035, 1104, 1176, 1225, 1275, 1326, 1404, 1485, 1540, 1596, 1653, 1740, 1860, 1953, 2016, 2080, 2145, 2244, 2346
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Dec 31 2008

Keywords

Examples

			a(1) = 0*1/2 = 0, a(2) = 1*4/2 = 2, a(3) = 4*6/2 = 12, etc.
		

Crossrefs

Cf. A141468.

Programs

  • Maple
    A141468 := proc(n) option remember ; local a; if n = 1 then 0; else for a from procname(n-1)+1 do if not isprime(a) then RETURN(a) ; fi; od: fi; end: A144551 := proc(n) A141468(n)*A141468(n+1)/2 ; end: for n from 1 to 200 do printf("%d,",A144551(n)) ; od: # R. J. Mathar, Jan 03 2009
  • Mathematica
    (Times@@#)/2&/@Partition[Select[Range[0,100],!PrimeQ[#]&],2,1] (* Harvey P. Dale, Feb 12 2020 *)
  • PARI
    c(n) = {for(k=0, primepi(n), isprime(n++)&&k--); n};
    t(n) = if(n<3,n-1,c(n-2));
    vector(100, n, t(n)*t(n+1)/2) \\ Altug Alkan, Oct 17 2015
    
  • PARI
    a(n) = my(A141468(n)=my(k=0); n--; while(-n+n+=-k+k=primepi(n), ); n); A141468(n)*A141468(n+1)/2; \\ Ruud H.G. van Tol, Jul 15 2024

Extensions

1963 replaced by 1953 by R. J. Mathar, Jan 03 2009
Showing 1-10 of 203 results. Next