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 21-30 of 80 results. Next

A104275 Numbers k such that 2k-1 is not prime.

Original entry on oeis.org

1, 5, 8, 11, 13, 14, 17, 18, 20, 23, 25, 26, 28, 29, 32, 33, 35, 38, 39, 41, 43, 44, 46, 47, 48, 50, 53, 56, 58, 59, 60, 61, 62, 63, 65, 67, 68, 71, 72, 73, 74, 77, 78, 80, 81, 83, 85, 86, 88, 89, 92, 93, 94, 95, 98, 101, 102, 103, 104, 105, 107, 108, 109, 110, 111, 113
Offset: 1

Views

Author

Alexandre Wajnberg, Apr 17 2005

Keywords

Comments

Same as A053726 except for the first term of this sequence.
Numbers k such that A064216(k) is not prime. - Antti Karttunen, Apr 17 2015
Union of 1 and terms of the form (u+1)*(v+1) + u*v with 1 <= u <= v. - Ralf Steiner, Nov 17 2021

Examples

			a(1) = 1 because 2*1-1=1, not prime.
a(2) = 5 because 2*5-1=9, not prime (2, 3 and 4 give 3, 5 and 7 which are primes).
From _Vincenzo Librandi_, Jan 15 2013: (Start)
As a triangular array (apart from term 1):
   5;
   8,  13;
  11,  18,  25;
  14,  23,  32,  41;
  17,  28,  39,  50,  61;
  20,  33,  46,  59,  72,  85;
  23,  38,  53,  68,  83,  98, 113;
  26,  43,  60,  77,  94, 111, 128, 145;
  29,  48,  67,  86, 105, 124, 143, 162, 181;
  32,  53,  74,  95, 116, 137, 158, 179, 200, 221; etc.
which is obtained by (2*h*k + k + h + 1) with h >= k >= 1. (End)
The above array, which contains the same terms as A053726 but in different order and with some duplicates, has its own entry A144650. - _Antti Karttunen_, Apr 17 2015
		

Crossrefs

Cf. A006254 (complement), A246371 (a subsequence).

Programs

  • Magma
    [n: n in [1..220]| not IsPrime(2*n-1)]; // Vincenzo Librandi, Jan 28 2011
    
  • Maple
    remove(t -> isprime(2*t-1), [$1..1000]); # Robert Israel, Apr 17 2015
  • Mathematica
    Select[Range[115], !PrimeQ[2#-1] &] (* Robert G. Wilson v, Apr 18 2005 *)
  • PARI
    select( {is_A104275(n)=!isprime(n*2-1)}, [1..115]) \\ M. F. Hasler, Aug 02 2022
    
  • Python
    from sympy import isprime
    def ok(n): return not isprime(2*n-1)
    print(list(filter(ok, range(1, 114)))) # Michael S. Branicky, May 08 2021
    
  • Python
    from sympy import primepi
    def A104275(n):
        if n <= 2: return ((n-1)<<2)+1
        m, k = n-1, (r:=primepi(n-1)) + n - 1 + (n-1>>1)
        while m != k:
            m, k = k, (r:=primepi(k)) + n - 1 + (k>>1)
        return r+n-1 # Chai Wah Wu, Aug 02 2024
    
  • SageMath
    [n for n in (1..250) if not is_prime(2*n-1)] # G. C. Greubel, Oct 17 2023
  • Scheme
    (define (A104275 n) (if (= 1 n) 1 (A053726 (- n 1)))) ;; More code in A053726. - Antti Karttunen, Apr 17 2015
    

Formula

a(n) = A047845(n-1) + 1.
For n > 1, a(n) = A053726(n-1) = n + A008508(n-1). - Antti Karttunen, Apr 17 2015
a(n) = (A014076(n)+1)/2. - Robert Israel, Apr 17 2015

Extensions

More terms from Robert G. Wilson v, Apr 18 2005

A045751 Numbers k such that 4*k + 1 is not prime.

Original entry on oeis.org

0, 2, 5, 6, 8, 11, 12, 14, 16, 17, 19, 20, 21, 23, 26, 29, 30, 31, 32, 33, 35, 36, 38, 40, 41, 42, 44, 46, 47, 50, 51, 52, 53, 54, 55, 56, 59, 61, 62, 63, 65, 66, 68, 71, 72, 74, 75, 76, 77, 80, 81, 82, 83, 85, 86, 89, 90, 91, 92, 94, 95, 96, 98, 101, 103, 104, 106, 107, 109
Offset: 1

Views

Author

Keywords

Comments

Terms (except 0) can be written as 4xy +- (x+y) for x > 0, y > 0. - Ron R Spencer, Jul 28 2016
Numbers k such that (4*k)!/(4*k + 1) is an integer. - Peter Bala, Jan 25 2017

Examples

			Distribution of the positive terms in the following triangular array:
   2;
   *,   6;
   5,   *,  12;
   *,  11,   *,  20;
   8,   *,  19,   *,  30;
   *,  16,   *,  29,   *,  42;
  11,   *,  26,   *,  41,   *,  56;
   *,  21,   *,  38,   *,  55,   *,  72;
  14,   *,  33,   *,  52,   *,  71,   *,  90;
   *,  26,   *,  47,   *,  68,   *,  89,   *, 110;
  17,   *,  40,   *,  63,   *,  86,   *, 109,   *, 132;
etc., where * marks the noninteger values of (2*h*k + k + h)/2 with h >= k >= 1. - _Vincenzo Librandi_, Jan 14 2013
		

Crossrefs

Programs

  • Magma
    [n: n in [0..220]| not IsPrime(4*n+1)]; // Vincenzo Librandi, Jan 28 2011
    
  • Maple
    for n from 0 to 100 do
    if irem(factorial(4*n), 4*n+1) = 0 then print(n); end if;
    end do: # Peter Bala, Jan 25 2017
  • Mathematica
    Select[Range[0, 200], ! PrimeQ[4 # + 1] &]
  • PARI
    is(n)=!isprime(4*n+1) \\ Charles R Greathouse IV, Jul 29 2016

Extensions

More terms from Erich Friedman

A095277 Numbers k such that 4k + 3 is composite.

Original entry on oeis.org

3, 6, 8, 9, 12, 13, 15, 18, 21, 22, 23, 24, 27, 28, 29, 30, 33, 35, 36, 38, 39, 42, 43, 45, 46, 48, 50, 51, 53, 54, 57, 58, 60, 61, 63, 64, 66, 68, 69, 71, 72, 73, 74, 75, 78, 79, 80, 81, 83, 84, 85, 87, 88, 90, 92, 93, 96, 97, 98, 99, 100, 101, 102, 103, 105, 106, 108
Offset: 1

Views

Author

Antti Karttunen, Jun 01 2004

Keywords

Comments

Terms can be written as (4xy +- (x-y)) - 1 for x > 0, y > 0. - Ron R Spencer, Aug 01 2016
Numbers k such that (4*k)!/(4*k + 3) is an integer. - Peter Bala, Jan 25 2017

Examples

			Distribution of the positive terms in the following triangular array:
  *;
  3,  *;
  *,  8,  *;
  6,  *, 15,  *;
  *, 13,  *, 24,  *;
  9,  *, 22,  *, 35,  *;
  *, 18,  *, 33,  *, 48,  *;
etc., where * marks the noninteger values of (2*h*k + k + h-1)/2 with h >= k >= 1. - _Vincenzo Librandi_, Apr 22 2014
		

Crossrefs

Complement of A095278. Cf. also A045751, A014076, A153170, A153088, A153329, A153343.

Programs

  • Magma
    [n: n in [0..110] |not IsPrime(4*n+3)]; // Vincenzo Librandi, Apr 22 2014\
    
  • Maple
    for n from 0 to 100 do
    if irem(factorial(4*n), 4*n+3) = 0 then print(n); end if;
    end do: # Peter Bala, Jan 25 2017
  • Mathematica
    Select[Range[150],!PrimeQ[4#+3]&] (* Harvey P. Dale, Jul 04 2011 *)
  • PARI
    is(n)=!isprime(4*n+3) \\ Charles R Greathouse IV, Aug 01 2016

Formula

a(n) = (A091236(n) - 3)/4.

A153088 Numbers k such that 5*k - 1 is not prime.

Original entry on oeis.org

1, 2, 3, 5, 7, 8, 9, 10, 11, 13, 14, 15, 17, 19, 20, 21, 23, 24, 25, 26, 27, 29, 31, 32, 33, 34, 35, 37, 38, 39, 41, 42, 43, 44, 45, 47, 49, 50, 51, 52, 53, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 71, 73, 74, 75, 77, 79, 80, 81, 83, 85, 86, 87, 89, 91, 92, 93
Offset: 1

Views

Author

Vincenzo Librandi, Jan 03 2009

Keywords

Examples

			Distribution of the even terms in the following triangular array:
   2;
   *,   *;
   *,   *,  10;
   *,   *,   *,   *;
   *,   *,   *,  20,   *;
   8,   *,   *,   *,   *,  34;
   *,   *,   *,   *,   *,   *,   *;
   *,   *,  24,   *,   *,   *,   *,  58;
   *,   *,   *,   *,  42,   *,   *,   *,   *;
   *,   *,   *,  38,   *,   *,   *,   *,  80,   *;
  14,   *,   *,   *,   *,  60,   *,   *,   *,   *, 106;
etc., where * marks the noninteger values of (4*h*k + 2*k + 2*h + 2)/5 with h >= k >= 1. - _Vincenzo Librandi_, Jan 15 2013
		

Crossrefs

Programs

  • Magma
    [n: n in [1..100] | not IsPrime(5*n-1)]; // Vincenzo Librandi, Oct 11 2012
  • Maple
    # produces the sequence apart from the initial terms 1 and 2
    for n from 0 to 100 do
      if irem(factorial(5*n), 5*n+4) = 0 then print(n+1); end if;
    end do: # Peter Bala, Jan 25 2017
  • Mathematica
    Select[Range[1, 200], !PrimeQ[5 # - 1] &] (* Vincenzo Librandi, Oct 11 2012 *)

Formula

a(n) = A153343(n) + 1. - Peter Bala, Jan 25 2017

Extensions

First 29 replaced with 20, 4 replaced with 44, extended by R. J. Mathar, Jan 05 2009
Erroneous comment deleted by N. J. A. Sloane, Jun 23 2010

A153170 Numbers k such that 3*k + 2 is not prime.

Original entry on oeis.org

2, 4, 6, 8, 10, 11, 12, 14, 16, 18, 20, 21, 22, 24, 25, 26, 28, 30, 31, 32, 34, 36, 38, 39, 40, 41, 42, 44, 46, 47, 48, 50, 51, 52, 53, 54, 56, 58, 60, 61, 62, 64, 66, 67, 68, 69, 70, 71, 72, 73, 74, 76, 78, 80, 81, 82, 84, 86, 88, 90, 91, 92, 94, 95, 96, 98, 99, 100, 101, 102
Offset: 1

Views

Author

Vincenzo Librandi, Dec 20 2008

Keywords

Comments

Contains the positive even numbers (A005843) and the odd numbers of the form 2*A059324(.) + 1. - R. J. Mathar, Nov 27 2010
Numbers k such that (3*k)!/(3*k + 2) is an integer. - Peter Bala, Jan 25 2017

Examples

			Distribution of the odd terms in the following triangular array:
  *;
  *,   *;
  *,  11,   *;
  *,   *,   *,   *;
  *,   *,  25,   *,   *;
  *,  21,   *,   *,  47,   *;
  *,   *,   *,   *,   *,   *,   *;
  *,   *,  39,   *,   *,  73,   *,   *;
  *,  31,   *,   *,  69,   *,   *, 107,   *;
  *,   *,   *,   *,   *,   *,   *,   *,   *,   *;
  *,   *,  53,   *,   *,  99,   *,   *, 145,   *,   *;
  *,  41,   *,   *,  91,   *,   *, 141,   *,   *, 191,   *;
etc., where * marks the noninteger values of (4*h*k + 2*k + 2*h - 1)/3 with h >= k >= 1. - _Vincenzo Librandi_, Jan 15 2013
		

Crossrefs

Programs

  • Magma
    [n: n in [1..110] | not IsPrime(3*n + 2)]; // Vincenzo Librandi, Oct 11 2012
  • Maple
    for n from 0 to 100 do
    if irem(factorial(3*n), 3*n+2) = 0 then print(n); end if;
    end do: # Peter Bala, Jan 25 2017
  • Mathematica
    Select[Range[1, 200], !PrimeQ[3*# + 2] &] (* Vincenzo Librandi, Oct 11 2012 *)
  • PARI
    for(n=1,200,if(!isprime(3*n+2), print1(n,", "))) \\  Joerg Arndt, Nov 27 2010
    

Extensions

Edited by N. J. A. Sloane, Jun 23 2010

A203069 Lexicographically earliest sequence of distinct positive numbers such that a(n-1)+a(n) is odd and composite.

Original entry on oeis.org

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

Views

Author

Zak Seidov, Dec 28 2011

Keywords

Comments

Inspired by an idea of Eric Angelini on the Sequence Fans list on Dec 28 2011.
Comments from N. J. A. Sloane, Aug 16 2021: (Start)
It is conjectured that this is a permutation of the positive integers. Is there a proof? The terms are distinct, by definition, and the sequence is clearly infinite. But does every number appear?
In the first 100000 terms, the only differences a(i)-a(i-1) that occur are -11, -9, -7, -5, -3, -1, 1, 3, 5, 7, 9, 11 (see A346610).
Also a(n) is surprisingly close to n - see A346611. (End)

Examples

			a(1)=1; the smallest possible even number m such that 1+m is composite is m=8, hence a(2)=8;
the smallest possible odd number m such that 8+m is composite is m=7, hence a(3)=7;
the smallest possible even number m such that 7+m is composite is m=2, hence a(4)=2.
		

Crossrefs

Cf. A010051, A249918 (inverse), A014076, A055266, A346610 (first differences), A346611.
See A346609 for the successive odd nonprimes that arise.

Programs

  • Haskell
    import Data.List (delete)
    a203069 n = a203069_list !! (n-1)
    a203069_list = 1 : f 1 [2..] where
       f u vs = g vs where
         g (w:ws) | odd z && a010051' z == 0 = w : f w (delete w vs)
                  | otherwise = g ws
                  where z = u + w
    -- Reinhard Zumkeller, Jan 14 2015
  • Maple
    (See link)
  • Mathematica
    Clear[used];used={1};oc[n_]:=Module[{k=If[OddQ[n],2,1]},While[ !CompositeQ[ n+k]||MemberQ[used,k],k+=2];Flatten[AppendTo[used,k]];k] (* Harvey P. Dale, Aug 16 2021 *)
  • Sage
    @cached_function
    def A203069(n):
        if n == 1: return 1
        used = set(A203069(i) for i in [1..n-1])
        works = lambda an: (A203069(n-1)+an) % 2 == 1 and len(divisors((A203069(n-1)+an))) > 2
        return next(k for k in PositiveIntegers() if k not in used and works(k)) # D. S. McNeil, Dec 28 2011
    

Extensions

Revised by N. J. A. Sloane, Aug 15 2021 at the suggestion of Harvey P. Dale.

A056653 Composite numbers together with 1 but excluding 4.

Original entry on oeis.org

1, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 25, 26, 27, 28, 30, 32, 33, 34, 35, 36, 38, 39, 40, 42, 44, 45, 46, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 60, 62, 63, 64, 65, 66, 68, 69, 70, 72, 74, 75, 76, 77, 78, 80, 81, 82, 84, 85, 86, 87, 88, 90, 91, 92, 93, 94, 95
Offset: 1

Views

Author

Robert G. Wilson v, Aug 30 2000

Keywords

Comments

These are also the numbers k such that k divides (k-1)!.

Crossrefs

Cf. A018252, A002808, A226198, A014076 (odd terms).

Programs

  • Maple
    for n from 1 to 100 do
      if irem(factorial(n-1),n) = 0 then print(n) end if;
    end do: # Peter Bala, Jan 24 2017
  • Mathematica
    Select[ Range[ 1, 100 ], Mod[ (# - 1)!, # ] == 0 & ]
    Join[{1},Select[Range[5,100],CompositeQ]] (* Harvey P. Dale, Jun 14 2024 *)
  • Python
    from sympy import composite
    def A056653(n): return composite(n) if n>1 else 1 # Chai Wah Wu, Jul 31 2024

Extensions

Edited by Vladeta Jovovic, Apr 30 2003

A153329 Numbers k such that 5*k + 1 is not prime.

Original entry on oeis.org

0, 1, 3, 4, 5, 7, 9, 10, 11, 13, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 27, 28, 29, 31, 32, 33, 34, 35, 37, 39, 40, 41, 43, 44, 45, 46, 47, 49, 51, 52, 53, 55, 57, 58, 59, 60, 61, 63, 64, 65, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 81, 82, 83, 85, 87
Offset: 1

Views

Author

Vincenzo Librandi, Dec 23 2008

Keywords

Comments

Numbers k such that (5*k)!/(5*k + 1) is an integer. - Peter Bala, Jan 25 2017

Examples

			Distribution of the even terms in the following triangular array:
   *;
   *,  *;
   4,  *,  *;
   *,  *,  *, 16;
   *,  *,  *,  *, 24;
   *,  *, 18,  *,  *,  *;
   *,  *,  *,  *,  *,  *,  *;
  10,  *,  *,  *,  *, 44,  *,  *;
   *,  *,  *, 34,  *,  *,  *,  *, 72;
   *,  *,  *,  *, 46,  *,  *,  *,  *, 88;
   *,  *, 32,  *,  *,  *,  *, 78,  *,  *,  *;
etc., where * marks the noninteger values of (4*h*k + 2*k + 2*h)/5 with h >= k >= 1. - _Vincenzo Librandi_, Jan 17 2013
		

Crossrefs

Programs

  • Magma
    [n: n in [0..150] | not IsPrime(5*n + 1)]; // Vincenzo Librandi, Jan 12 2013
  • Maple
    for n from 0 to 100 do
    if irem(factorial(5*n), 5*n+1) = 0 then print(n); end if;
    end do: # Peter Bala, Jan 25 2017
  • Mathematica
    Select[Range[0, 200], !PrimeQ[5*# + 1]&] (* Vincenzo Librandi, Jan 12 2013 *)

Extensions

Erroneous comment deleted by N. J. A. Sloane, Jun 23 2010
0 added by Arkadiusz Wesolowski, Aug 03 2011

A153343 Numbers k such that 5*k + 4 is not prime.

Original entry on oeis.org

0, 1, 2, 4, 6, 7, 8, 9, 10, 12, 13, 14, 16, 18, 19, 20, 22, 23, 24, 25, 26, 28, 30, 31, 32, 33, 34, 36, 37, 38, 40, 41, 42, 43, 44, 46, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 70, 72, 73, 74, 76, 78, 79, 80, 82, 84, 85, 86, 88
Offset: 1

Views

Author

Vincenzo Librandi, Dec 24 2008

Keywords

Comments

Apart from a(0) = 0 and a(1) = 1 this sequence comprises those numbers k such that (5*k)!/(5*k + 4) is an integer. - Peter Bala, Jan 25 2017

Examples

			Distribution of the odd terms in the following triangular array:
   1;
   *,   *;
   *,   *,   9;
   *,   *,   *,   *;
   *,   *,   *,  19,   *;
   7,   *,   *,   *,   *,  33;
   *,   *,   *,   *,   *,   *,   *;
   *,   *,  23,   *,   *,   *,   *,  57;
   *,   *,   *,   *,  41,   *,   *,   *,   *;
   *,   *,   *,  37,   *,   *,   *,   *,  79,   *;
  13,   *,   *,   *,   *,  59,   *,   *,   *,   *,  105;
etc., where * marks the noninteger values of (4*h*k + 2*k + 2*h - 3)/5 with h >= k >= 1. - _Vincenzo Librandi_, Jan 17 2013
		

Crossrefs

Programs

  • Magma
    [n: n in [0..150] | not IsPrime(5*n + 4)]; // Vincenzo Librandi, Jan 12 2013
  • Maple
    # produces the sequence apart from the initial terms 0 and 1
    for n from 0 to 100 do
    if irem(factorial(5*n), 5*n+4) = 0 then print(n); end if;
    end do: # Peter Bala, Jan 25 2017
  • Mathematica
    Select[Range[0, 200], !PrimeQ[5*# + 4]&] (* Vincenzo Librandi, Jan 12 2013 *)

Extensions

Erroneous comment deleted by N. J. A. Sloane, Jun 23 2010
0 added by Arkadiusz Wesolowski, Aug 03 2011

A093183 Number of consecutive runs of just 1 odd nonprime congruent to 1 mod 4 below 10^n.

Original entry on oeis.org

0, 3, 74, 1114, 13437, 151311, 1642197, 17405273, 181925434, 1883327626, 19364371468, 198115934511, 2019328584101
Offset: 1

Views

Author

Enoch Haga, Mar 30 2004

Keywords

Comments

Split the odd nonprime sequence A014076 into two subsequences A091113 and A091236 with nonprimes labeled 1 mod 4 or 3 mod 4. Add count of nonprimes to sequence if just 1 nonprime congruent to 1 mod 4 occurs before interruption of a nonprime congruent to 3 mod 4.
Otherwise said: count the nonprimes congruent to 1 mod 4 such that the next larger and next smaller odd nonprime is congruent to 3 mod 4. - M. F. Hasler, Sep 30 2018

Examples

			a(3) = 74 because 74 single nonprime runs occur below 10^3, each run interrupted by a nonprime congruent to 3 mod 4.
Below 10^2 = 100, there are only a(2) = 3 isolated odd nonprimes congruent to 1 mod 4: 33, 57 and 93. (Credits: _Peter Munn_, SeqFan list.) - _M. F. Hasler_, Sep 30 2018
		

Crossrefs

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;
                end if;
            end do:
        end if;
    end proc:
    isA091113 := proc(n)
        option remember;
        if modp(n,4) = 1 and not isprime(n) then
            true;
        else
            false;
        end if;
    end proc:
    isA091236 := proc(n)
        option remember;
        if modp(n,4) = 3 and not isprime(n) then
            true;
        else
            false;
        end if;
    end proc:
    ct := 0 :
    n := 1 :
    for i from 2 do
        odnpr := A014076(i) ;
        prev := A014076(i-1) ;
        nxt := A014076(i+1) ;
        if isA091113(odnpr) and isA091236(prev) and isA091236(nxt) then
            ct := ct+1 ;
        end if;
        if odnpr< 10^n and nxt >= 10^n then
            print(n,ct) ;
            n := n+1 ;
        end if;
    end do: # R. J. Mathar, Oct 02 2018
  • Mathematica
    A091113 = Select[4 Range[0, 10^5] + 1, ! PrimeQ[#] &];
    A091236 = Select[4 Range[0, 10^5] + 3, ! PrimeQ[#] &];
    lst = {}; Do[If[Length[s = Select[A091113,Between[{A091236[[i]], A091236[[i + 1]]}]]] == 1, AppendTo[lst, s]], {i, Length[A091236] - 1}]; Table[Count[Flatten[lst], x_ /; x < 10^n], {n, 5}]  (* Robert Price, May 30 2019 *)

Extensions

a(9)-a(13) from Bert Dobbelaere, Dec 19 2018
Previous Showing 21-30 of 80 results. Next