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.

Previous Showing 51-60 of 80 results. Next

A292597 a(1) = 1; for n > 1, a(n) = c(n) + 2*a(floor(n/2)), where c(n) is the characteristic function of odd composites, A071904.

Original entry on oeis.org

1, 2, 2, 4, 4, 4, 4, 8, 9, 8, 8, 8, 8, 8, 9, 16, 16, 18, 18, 16, 17, 16, 16, 16, 17, 16, 17, 16, 16, 18, 18, 32, 33, 32, 33, 36, 36, 36, 37, 32, 32, 34, 34, 32, 33, 32, 32, 32, 33, 34, 35, 32, 32, 34, 35, 32, 33, 32, 32, 36, 36, 36, 37, 64, 65, 66, 66, 64, 65, 66, 66, 72, 72, 72, 73, 72, 73, 74, 74, 64, 65, 64, 64, 68, 69, 68, 69, 64, 64, 66, 67
Offset: 1

Views

Author

Antti Karttunen, Sep 27 2017

Keywords

Comments

1-bits in base-2 expansion of a(n) indicate the positions of odd nonprimes in the sequence [n, floor(n/2), floor(n/4), ..., 1].

Crossrefs

Formula

a(1) = 1; for n > 1, a(n) = (A000035(n)*(1-A010051(n))) + 2*a(floor(n/2)).
For all n >= 1, a(n) + A292596(n) = n.

A336410 Complement of A336411.

Original entry on oeis.org

1, 3, 5, 6, 8, 9, 11, 12, 13, 15, 16, 18, 19, 20, 21, 22, 24, 26, 27, 28, 29, 31, 33, 34, 35, 36, 37, 39, 41, 43, 44, 45, 47, 48, 50, 51, 52, 53, 55, 56, 58, 59, 60, 62, 63, 64, 65, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 79, 81, 82, 83, 84, 85, 87, 88
Offset: 1

Views

Author

Clark Kimberling, Sep 06 2020

Keywords

Comments

Previous name was: "Numbers k such that prime(k) - oc(k) = 2, where oc(k) is the greatest odd composite < prime(k)".

Crossrefs

Programs

  • Mathematica
    z = 5000; d = Select[Range[2, z], ! PrimeQ@# && OddQ@# &];  (* A014076 *)
    f[n_] := Select[d, # < Prime[n] &];
    t = Table[Prime[n] - Max[f[n]], {n, 5, 300}]  (* A336409 *)
    Flatten[Position[t, 2]]  (* this sequence *)
    Flatten[Position[t, 4]]  (* A336411 *)

Formula

a(n) = (A176852(n) - 5)/2. - Hugo Pfoertner, Jul 19 2023

Extensions

Offset corrected by Mohammed Yaseen, Jul 19 2023
New name from Hugo Pfoertner, Jul 20 2023

A336411 a(n) = A029707(n+2) - 3 for n >= 1.

Original entry on oeis.org

2, 4, 7, 10, 14, 17, 23, 25, 30, 32, 38, 40, 42, 46, 49, 54, 57, 61, 66, 78, 80, 86, 95, 101, 106, 110, 113, 117, 137, 139, 141, 145, 149, 168, 170, 173, 175, 179, 187, 198, 203, 206, 209, 212, 222, 227, 231, 233, 250, 253, 259, 262, 265, 274, 283, 285, 291
Offset: 1

Views

Author

Clark Kimberling, Sep 06 2020

Keywords

Comments

Previous name was "Numbers k such that prime(k) - oc(k) = 4, where oc(k) is the greatest odd composite < prime(k)".

Crossrefs

Programs

  • Mathematica
    z = 5000; d = Select[Range[2, z], ! PrimeQ@# && OddQ@# &];  (* A014076 *)
    f[n_] := Select[d, # < Prime[n] &];
    t = Table[Prime[n] - Max[f[n]], {n, 5, 300}]  (* A336409 *)
    Flatten[Position[t, 2]]  (* A336410 *)
    Flatten[Position[t, 4]]  (* this sequence *)

Formula

a(n) = A029707(n+2) - 3 = A155752(n+2) - 2. - Hugo Pfoertner, Oct 02 2020

Extensions

Offset corrected by Mohammed Yaseen, Jul 17 2023
New name from Hugo Pfoertner, Jul 19 2023

A024683 a(n) is the number of ways prime(n) is a sum of two composite numbers r,s satisfying r < s.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 1, 2, 2, 4, 5, 6, 7, 8, 8, 10, 12, 13, 14, 15, 16, 17, 18, 20, 23, 24, 25, 25, 26, 26, 32, 33, 35, 36, 39, 40, 41, 43, 44, 46, 48, 49, 52, 53, 53, 54, 58, 63, 64, 65, 65, 67, 68, 71, 73, 75, 77, 78, 79, 80, 81, 84, 90, 91, 92, 92, 98, 100, 104, 105, 105, 107, 110, 112, 114
Offset: 1

Views

Author

Keywords

Crossrefs

Subsequence of A224708.

Programs

Formula

a(n) = Sum_{i=4..floor((prime(n)-1)/2)} c(i) * c(prime(n)-i), where c is the characteristic function of composite numbers (A066247) and prime(n) is the n-th prime (A000040). - Wesley Ivan Hurt, Sep 08 2020

A123754 Positive numbers of the form 4*n^2 - 1 which are not semiprimes.

Original entry on oeis.org

3, 63, 99, 195, 255, 399, 483, 575, 675, 783, 1023, 1155, 1295, 1443, 1599, 1935, 2115, 2303, 2499, 2703, 2915, 3135, 3363, 3843, 4095, 4355, 4623, 4899, 5475, 5775, 6083, 6399, 6723, 7055, 7395, 7743, 8099, 8463, 8835, 9215, 9603, 9999, 10815
Offset: 1

Views

Author

Roger L. Bagula, Nov 16 2006

Keywords

Comments

Positive numbers of the form 4*n^2 - 1 which are semiprimes can be found in A037074.
Or, all positive products of the form A014076(i)*[A014076(i)+-2], duplicates removed. - R. J. Mathar, Aug 08 2007

Crossrefs

Programs

  • Mathematica
    Select[4*(Range[54])^2-1, Not[PrimeQ[Sqrt[(#+ 1)]-1] && PrimeQ[Sqrt[(#+1)]+1]]&]
    Select[4*Range[100]^2-1,PrimeOmega[#]!=2&] (* Harvey P. Dale, Jul 24 2016 *)

Formula

Equals ( A000466 - {-1} ) - A001358. - R. J. Mathar, Aug 08 2007

Extensions

Edited by N. J. A. Sloane, Aug 03 2007

A145195 Odd composite numbers n with property that at least one prime divisor p of n is a substring of the binary representation of n.

Original entry on oeis.org

15, 27, 39, 45, 51, 55, 57, 63, 75, 85, 87, 91, 93, 95, 99, 105, 111, 117, 119, 123, 125, 135, 141, 147, 153, 155, 159, 165, 171, 175, 177, 183, 185, 187, 189, 195, 201, 205, 207, 213, 215, 219, 221, 225, 231, 235, 237, 243, 245, 247, 249, 255, 267, 279, 285
Offset: 1

Views

Author

Robert G. Wilson v, Oct 03 2008

Keywords

Comments

It is obvious that all even numbers and all prime numbers would meet this criterion.

Examples

			15 is 1111_2 and 15=3*5 where 3 is 11_2, so 15 is a term.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{nb = ToString@ FromDigits@ IntegerDigits[n, 2], psb = ToString@ FromDigits@ IntegerDigits[ #, 2] & /@ First@ Transpose@ FactorInteger@n, c = 0, k = 1}, lmt = 1 + Length@ psb; While[k < lmt, If[ StringCount[nb, psb[[k]]] > 0, c++ ]; k++ ]; c]; f[1] = 0; Select[ Range@ 286, !PrimeQ@ # && OddQ@ # && f@# > 0 &]

A154384 Odd nonprimes with odd sum of digits.

Original entry on oeis.org

1, 9, 21, 25, 27, 45, 49, 63, 65, 69, 81, 85, 87, 111, 115, 117, 119, 133, 135, 153, 155, 159, 171, 175, 177, 195, 201, 203, 205, 207, 209, 221, 225, 243, 245, 247, 249, 261, 265, 267, 285, 287, 289, 315, 319, 333, 335, 339, 351, 355, 357, 371, 375, 377, 391
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jan 08 2009

Keywords

Examples

			1 is an odd nonprime and has an odd sum of digits, so a(1)=1.
9 is an odd nonprime and has an odd sum of digits (and this is not true for any integers between 1 and 9), so a(2)=9.
21 is an odd nonprime, and the sum of its digits (2+1=3) is odd (and this is not true for any integers between 9 and 21), so a(3)=21, etc.
45 is in the sequence because it is odd, it is a nonprime and the sum of its digits (9) is odd. - _Emeric Deutsch_, Jan 21 2009
		

Crossrefs

Odd nonprimes in A014076.

Programs

  • Maple
    sd := proc (n) options operator, arrow: add(convert(n, base, 10)[j], j = 1 .. nops(convert(n, base, 10))) end proc: a := proc (n) if `mod`(n, 2) = 1 and isprime(n) = false and `mod`(sd(n), 2) = 1 then n else end if end proc: seq(a(n), n = 1 .. 400); # Emeric Deutsch, Jan 21 2009
  • Mathematica
    Select[Complement[Range[1,501,2],Prime[Range[PrimePi[501]]]],OddQ[Total[IntegerDigits[#]]]&] (* Harvey P. Dale, Dec 11 2010 *)
  • PARI
    isok(n) = ! isprime(n) && (n % 2) && (sumdigits(n) % 2); \\ Michel Marcus, Sep 16 2016

Extensions

Corrected and extended by Emeric Deutsch, Jan 21 2009

A162023 Exactly 10 consecutive odd integers starting with n are composite.

Original entry on oeis.org

1131, 1341, 1673, 1953, 2183, 2313, 2483, 2559, 2979, 3143, 3231, 3279, 3471, 3741, 3969, 4029, 4181, 4307, 4527, 4763, 4841, 5127, 5241, 5361, 5451, 5537, 5603, 5759, 5961, 6177, 6401, 6429, 6501, 6741, 6927, 7083, 7131, 7263, 7373, 7769, 7797, 7973
Offset: 1

Views

Author

Zak Seidov, Jun 25 2009, typo corrected Aug 14 2009

Keywords

Examples

			Exactly 10 consecutive odd integers 1131(2)1149 are composite while 1151 is prime.
		

Crossrefs

Programs

  • Maple
    R:= NULL: count:= 0: k:= 1: state:= 0:
    while count < 100 do
      k:= k+2;
      if isprime(k) then
        if state >= 10 then R:= R,k - 20; count:= count + 1;  fi;
        state:= 0;
      else state:= state + 1
      fi;
    od:
    R; # Robert Israel, Feb 12 2025
  • Mathematica
    Transpose[Select[Partition[Range[1,8001,2],11,1],PrimeQ/@ == {False,False,False,False,False,False,False,False,False,False,True}&]] [[1]] (* Harvey P. Dale, Nov 21 2011 *)

A162886 Even numbers in an alternating 1-based sum up to some odd nonprime.

Original entry on oeis.org

24, 42, 54, 60, 78, 84, 96, 114, 132, 138, 144, 150, 168, 174, 180, 186, 204, 216, 222, 234, 240, 258, 264, 276, 282, 294, 306, 312, 324, 330, 348, 354, 366, 372, 384, 390, 402, 414, 420, 432, 438, 444, 450, 456, 474, 480, 486, 492, 504, 510, 516, 528, 534, 546, 558, 564
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jul 16 2009

Keywords

Comments

Define an alternating sum S(n) = Sum_{k=0..n} (1-(-1)^k*k) = A064455(n+1).
The sequence contains this sum evaluated for an upper limit of the odd nonprimes where the sum is even.

Examples

			S(n) evaluated at n=1, 9, 15, 21, ... (taken from A014076) is 3, 15, 24, 33, 42, 51, etc., where only the even values (i.e., 24, 42, etc.) join the sequence.
		

Crossrefs

Cf. A014076.

Programs

  • Maple
    A014076 := proc(n) option remember ; if n = 1 then 1; else for a from procname(n-1)+2 by 2 do if not isprime(a) then RETURN(a) ; fi; od: fi; end:
    S := proc(n) A064455(A014076(n)+1) ; end:
    for n from 1 to 200 do if S(n) mod 2 = 0 then printf("%d,",S(n)) ; fi; od: # R. J. Mathar, Jul 21 2009

Extensions

Edited and values checked by R. J. Mathar Jul 21 2009

A163301 a(n) = Sum_{x=n-th even nonprime..n-th odd nonprime} -x*(-1)^x.

Original entry on oeis.org

1, 3, 5, 7, 8, 8, 10, 10, 11, 13, 14, 14, 15, 15, 17, 17, 18, 20, 20, 21, 22, 22, 23, 23, 23, 24, 26, 28, 29, 29, 29, 29, 29, 29, 30, 31, 31, 33, 33, 33, 33, 35, 35, 36, 36, 37, 38, 38, 39, 39, 41, 41, 41, 41, 43, 45, 45, 45, 45, 45, 46, 46, 46, 46, 46, 47, 49, 50, 50, 52, 52
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jul 26 2009

Keywords

Comments

Here n-th even nonprime = A163300(n), n-th odd nonprime = A014076(n) and A163300 U A014076 = A141468.
Seems to be essentially the same as A008508. - R. J. Mathar, May 30 2025

Examples

			a(1) = -0*(-1)^0 - 1*(-1)^1 = 0 + 1 = 1;
a(2) = -4*(-1)^4 - 5*(-1)^5 - 6*(-1)6 - 7*(-1)^7 - 8*(-1)^8 - 9*(-1)^9 = -4 + 5 - 6 + 7 - 8 + 9 = 3.
		

Crossrefs

Programs

  • Maple
    A163300 := proc(n) if n <= 2 then op(n,[0,4]) ; else for a from procname(n-1)+2 by 2 do if not isprime(a) then return a; end if; end do; end if; end proc:
    A014076 := proc(n) if n = 1 then 1; else for a from procname(n-1)+2 by 2 do if not isprime(a) then return a ; end if; end do: end if; end proc:
    A001057 := proc(n) (1-(-1)^n*(2*n+1))/4; end proc:
    A163301 := proc(n) A001057( A014076(n)) - A001057(A163300(n)-1) ; end proc: seq(A163301(n),n=1..120) ; # R. J. Mathar, May 21 2010

Formula

a(n) = Sum_{x=A163300(n)..A014076(n)}-x*(-1)^x.
a(n) = A001057( A014076(n)) - A001057(A163300(n)-1). - R. J. Mathar, May 21 2010

Extensions

Corrected from a(39) onwards by R. J. Mathar, May 21 2010
Previous Showing 51-60 of 80 results. Next