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

A196277 Numbers m such that A196274(m) > 1.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 9, 10, 12, 14, 16, 17, 19, 20, 22, 25, 26, 27, 28, 34, 35, 37, 41, 43, 45, 46, 48, 50, 54, 55, 60, 65, 66, 67, 69, 73, 75, 77, 79, 81, 82, 86, 92, 93, 94, 100, 102, 106, 107, 109, 112, 114, 116, 117, 119, 122, 123, 126, 130, 134, 136, 137
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 30 2011

Keywords

Comments

Complement of A196276; A196274(a(n)) > 1;
A047846(n+1) = a(n+1) - a(n).

Programs

  • Haskell
    import Data.List (findIndices)
    a196277 n = a196277_list !! (n-1)
    a196277_list = map (+ 1) $ findIndices (> 1) a196274_list

A196276 Numbers m such that A196274(m) = 1.

Original entry on oeis.org

5, 7, 11, 13, 15, 18, 21, 23, 24, 29, 30, 31, 32, 33, 36, 38, 39, 40, 42, 44, 47, 49, 51, 52, 53, 56, 57, 58, 59, 61, 62, 63, 64, 68, 70, 71, 72, 74, 76, 78, 80, 83, 84, 85, 87, 88, 89, 90, 91, 95, 96, 97, 98, 99, 101, 103, 104, 105, 108, 110, 111, 113, 115
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 30 2011

Keywords

Comments

Complement of A196277; A196274(a(n)) = 1.

Programs

  • Haskell
    import Data.List (elemIndices)
    a196276 n = a196276_list !! (n-1)
    a196276_list = map (+ 1) $ elemIndices 1 a196274_list

A014076 Odd nonprimes.

Original entry on oeis.org

1, 9, 15, 21, 25, 27, 33, 35, 39, 45, 49, 51, 55, 57, 63, 65, 69, 75, 77, 81, 85, 87, 91, 93, 95, 99, 105, 111, 115, 117, 119, 121, 123, 125, 129, 133, 135, 141, 143, 145, 147, 153, 155, 159, 161, 165, 169, 171, 175, 177, 183, 185, 187, 189, 195, 201, 203, 205, 207
Offset: 1

Views

Author

Keywords

Comments

Same as A071904 except for the initial term 1 (which is not composite).
Numbers n such that product of first n odd numbers divided by sum of the first n odd numbers is an integer : 1*3*5*...*(2*n - 1) / (1 + 3 + 5 + ... + (2*n - 1)) = c. - Ctibor O. Zizka, Jun 26 2010
Conjecture: There exist infinitely many pairs [a(n), a(n)+6] such that a(n)/3 and (a(n)+6)/3 are twin primes. - Eric Desbiaux, Sep 25 2014.
Odd numbers 2*n + 1 such that (2*n)!/(2*n + 1) is an integer. Odd terms of A056653. - Peter Bala, Jan 24 2017

Crossrefs

Cf. A002808, A005408; first differences: A067970, A196274; A047846.
Cf. A056653.

Programs

  • Haskell
    a014076 n = a014076_list !! (n-1)
    a014076_list = filter ((== 0) . a010051) a005408_list
    -- Reinhard Zumkeller, Sep 30 2011
    
  • Maple
    remove(isprime, [seq(i,i=1..1000,2)]); # Robert Israel, May 25 2016
    for n from 0 to 120 do
    if irem(factorial(2*n), 2*n+1) = 0 then print(2*n+1) end if;
    end do: # Peter Bala, Jan 24 2017
  • Mathematica
    Select[Range@210, !PrimeQ@ # && OddQ@ # &] (* Robert G. Wilson v, Sep 22 2008 *)
    Select[Range[1, 199, 2], PrimeOmega[#] != 1 &] (* Alonso del Arte, Nov 19 2012 *)
  • PARI
    is(n)=n%2 && !isprime(n) \\ Charles R Greathouse IV, Nov 24 2012
    
  • Python
    from sympy import primepi
    def A014076(n):
        if n == 1: return 1
        m, k = n-1, primepi(n) + n - 1 + (n>>1)
        while m != k:
            m, k = k, primepi(k) + n - 1 + (k>>1)
        return m # Chai Wah Wu, Jul 31 2024

Formula

A000035(a(n))*(1 - A010051(a(n))) = 1. - Reinhard Zumkeller, Sep 30 2011
a(n) ~ 2n. - Charles R Greathouse IV, Jul 02 2013
(a(n+2)-1)/2 - pi(a(n+2)-1) = n. - Anthony Browne, May 25 2016. Proof from Robert Israel: This follows by induction on n. If f(n) = (a(n+2)-1)/2 - pi(a(n+2)-1), one can show f(n+1) - f(n) = 1 (there are three cases to consider, depending on primeness of a(n+2) + 2 and a(n+2) + 4).
Union of A091113 and A091236. - R. J. Mathar, Oct 02 2018

A373403 Length of the n-th maximal antirun of composite numbers differing by more than one.

Original entry on oeis.org

3, 1, 3, 1, 3, 1, 2, 1, 1, 1, 3, 1, 1, 1, 2, 1, 3, 1, 2, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 2, 1, 3, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 3, 1, 3, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1
Offset: 1

Views

Author

Gus Wiseman, Jun 05 2024

Keywords

Comments

This antirun ranges from A005381 (with 4 prepended) to A068780, with sum A373404.
An antirun of a sequence (in this case A002808) is an interval of positions such that consecutive terms differ by more than one.

Examples

			Row-lengths of:
   4   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
		

Crossrefs

Functional neighbors: A005381, A027833 (partial sums A029707), A068780, A176246 (rest of A046933, firsts A073051), A373127, A373404, A373409.
A000040 lists the primes, differences A001223.
A046933 counts composite numbers between primes.
A065855 counts composite numbers up to n.

Programs

  • Mathematica
    Length/@Split[Select[Range[100],CompositeQ],#1+1!=#2&]//Most

Formula

a(2n) = 1.
a(2n - 1) = A196274(n) for n > 1.

A067970 First differences of A014076, the odd nonprimes.

Original entry on oeis.org

8, 6, 6, 4, 2, 6, 2, 4, 6, 4, 2, 4, 2, 6, 2, 4, 6, 2, 4, 4, 2, 4, 2, 2, 4, 6, 6, 4, 2, 2, 2, 2, 2, 4, 4, 2, 6, 2, 2, 2, 6, 2, 4, 2, 4, 4, 2, 4, 2, 6, 2, 2, 2, 6, 6, 2, 2, 2, 2, 4, 2, 2, 2, 2, 4, 6, 4, 2, 6, 2, 2, 2, 4, 2, 4, 2, 4, 2, 6, 2, 4, 6, 2, 2, 2, 4, 2, 2, 2, 2, 2, 4, 6, 4, 2, 2, 2, 2, 2, 4, 2, 4, 2, 2, 2
Offset: 1

Views

Author

Labos Elemer, Feb 04 2002

Keywords

Comments

In this sequence 8 occurs once, but 2,4,6 may occur several times. No other even number arises. Therefore sequence consists of {8,6,4,2}.
Proof: If x is an odd nonprime, then x+2=next-odd-number is either nonprime[Case1] or it is a prime [Case 2]. In Case 1 the difference is 2. E.g., x=25, x+2=27, the actual difference is d=2.
In Case 2 x+2=p=prime. Distinguish two further subcases. In Case 2a: x+2=p=prime and p+2=x+4=q is also a prime. Then x+2+2+2=x+6 will not be prime because in first difference sequence of prime no d=2 occurs twice except for p+2=3+2=5,5+2=7, i.e., when p is divisible by 3; for 6k+1 and 6k+5 primes it is impossible. Consequently x+6 is not a prime and so the difference between two consecutive odd nonprimes is 6. Example: x=39, x+2=41=smaller twin prime and next odd nonprime x+6=45, d=6
In Case 2b: x+2=p=prime, but x+2+2=x+4 is not a prime, i.e., x+2=p is not a smaller one of a twin-prime pair. Thus x+4 is the next odd nonprime. Thus the difference=4. E.g., x=77, x+2=79, so the next odd nonprime is x+4=81, d=4. No more cases. QED.
Interestingly this sequence picks out the twin primes.
That the first term is special is a reflection of the simple fact that there are no 3 consecutive odd primes except from 3, 5, 7 corresponding to A067970(1) = 8 = 9-1 = (7+2)-(3-2). - Frank Ellermann, Feb 08 2002
There are arbitrarily long runs of 2's, but not of 4's or 6's. - Zak Seidov, Oct 01 2011

Crossrefs

Programs

  • Haskell
    a067970 n = a067970_list !! (n-1)
    a067970_list = zipWith (-) (tail a014076_list) a014076_list
    -- Reinhard Zumkeller, Sep 30 2011
    
  • Mathematica
    a = Select[ Range[300], !PrimeQ[ # ] && !EvenQ[ # ] & ]; Table[ a[[n + 1]] - a[[n]], {n, 1, Length[a] - 1} ]
    With[{nn=401},Differences[Complement[Range[1,nn,2],Prime[Range[PrimePi [nn]]]]]]  (* Harvey P. Dale, Feb 05 2012 *)
  • Python
    from sympy import primepi, isprime
    def A067970(n):
        if n == 1: return 8
        m, k = n-1, primepi(n) + n - 1 + (n>>1)
        while m != k:
            m, k = k, primepi(k) + n - 1 + (k>>1)
        for d in range(2,7,2):
            if not isprime(m+d):
                return d # Chai Wah Wu, Jul 31 2024

Formula

a(n) = A014076(n+1) - A014076(n).
a(n) = 2 * A196274(n); a(A196276(n)) = 2; a(A196277(n)) > 2. - Reinhard Zumkeller, Sep 30 2011

Extensions

Edited by Robert G. Wilson v, Feb 08 2002
Offset changed to 1 by Jason Yuen, Jan 08 2025

A025549 a(n) = (2n-1)!!/lcm{1,3,5,...,2n-1}.

Original entry on oeis.org

1, 1, 1, 1, 3, 3, 3, 45, 45, 45, 945, 945, 4725, 42525, 42525, 42525, 1403325, 49116375, 49116375, 1915538625, 1915538625, 1915538625, 86199238125, 86199238125, 603394666875, 30773128010625, 30773128010625, 1692522040584375, 96473756313309375, 96473756313309375
Offset: 1

Views

Author

Keywords

Crossrefs

Not always equal to the second left hand column of A161198 triangle divided by A074599. - Johannes W. Meijer, Jun 08 2009
Cf. A196274 (run lengths of equal terms).

Programs

  • Maple
    seq(doublefactorial(2*n-1)/lcm(seq((2*k-1), k=1..n)), n=1..27) ; # Johannes W. Meijer, Jun 08 2009
  • Mathematica
    L[ {x___} ] := LCM[ x ]; Table[ (2n-1)!!/L[ Range[ 1, 2n-1, 2 ] ], {n, 1, 50} ]
    (* Second program: *)
    Array[#!!/LCM @@ Range[1, #, 2] &[2 # - 1] &, 30] (* Michael De Vlieger, Feb 19 2019 *)
  • PARI
    a(n) = (((2*n)!/n!)/2^n)/lcm(vector(n, i, 2*i-1)); \\ Michel Marcus, Dec 02 2014

Formula

a(n) = A001147(n)/A025547(n). - Michel Marcus, Dec 02 2014

Extensions

Description corrected and sequence extended by Erich Friedman
More terms from Michel Marcus, Dec 02 2014
Showing 1-6 of 6 results.