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

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.

A036691 Compositorial numbers: product of first n composite numbers.

Original entry on oeis.org

1, 4, 24, 192, 1728, 17280, 207360, 2903040, 43545600, 696729600, 12541132800, 250822656000, 5267275776000, 115880067072000, 2781121609728000, 69528040243200000, 1807729046323200000, 48808684250726400000, 1366643159020339200000
Offset: 0

Views

Author

Keywords

Comments

a(A196415(n)) = A141092(n) * A053767(A196415(n)). - Reinhard Zumkeller, Oct 03 2011
For n>11, A000142(n) < a(n) < A002110(n). - Chayim Lowen, Aug 18 2015
For n = {2,3,4}, a(n) is testably a Zumkeller number (A083207). For n > 4, a(n) is of the form 2^e_1 * p_2^e_2 * … * p_m^e_m, where e_m = 1 and e = floor(log_2(p_m)) < e_1. Therefore, 2^e * p_m^e_m is primitive Zumkeler number (A180332). Therefore, 2^e_1 * p_m^e_m is a Zumkeller number. Therefore, a(n) = 2^e_1 * p_m^e_m * r, where r is relatively prime to 2*p_m is a Zumkeller number. Therefore, for n > 1, a(n) is a Zumkeller number (see my proof at A002182 for details). - Ivan N. Ianakiev, May 04 2020

Examples

			a(3) = c(1)*c(2)*c(3) = 4*6*8 = 192.
		

Crossrefs

Cf. primorial numbers A002110. Distinct members of A049614. See also A049650, A060880.
Cf. A092435 (subsequence: A092435(n) = a(prime(n)-n-1)). - Chayim Lowen, Jul 23 2015

Programs

  • Haskell
    a036691_list = scanl1 (*) a002808_list -- Reinhard Zumkeller, Oct 03 2011
    
  • Maple
    A036691 := proc(n)
            mul(A002808(i),i=1..n) ;
    end proc: # R. J. Mathar, Oct 03 2011
  • Mathematica
    Composite[n_] := FixedPoint[n + PrimePi[ # ] + 1 &, n + PrimePi[n] + 1]; Table[ Product[ Composite[i], {i, 1, n}], {n, 0, 18}] (* Robert G. Wilson v, Sep 13 2003 *)
    nn=50;cnos=Complement[Range[nn],Prime[Range[PrimePi[nn]]]];Rest[FoldList[ Times,1,cnos]] (* Harvey P. Dale, May 19 2011 *)
    A036691 = Union[Table[n!/(Times@@Prime[Range[PrimePi[n]]]), {n, 29}]] (* Alonso del Arte, Sep 21 2011 *)
    Join[{1},FoldList[Times,Select[Range[30],CompositeQ]]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jul 14 2019 *)
  • PARI
    a(n)=my(c,p);c=4;p=1;while(n>0,if(!isprime(c),p=p*c;n=n-1);c=c+1);p \\ Ralf Stephan, Dec 21 2013
    
  • Python
    from sympy import factorial, primepi, primorial, composite
    def A036691(n):
        return factorial(composite(n))//primorial(primepi(composite(n))) if n > 0 else 1 # Chai Wah Wu, Sep 08 2020

Formula

From Chayim Lowen, Jul 23 - Aug 05 2015: (Start)
a(n) = Product_{k=1..A002808(n)-n-1} prime(k)^(A085604(A002808(n),k)-1).
Sum_{k >= 1} 1/a(k) = 1.2975167655550616507663335821769... is to this sequence as e is to the factorials. (End)

Extensions

Corrected and extended by Niklas Eriksen (f95-ner(AT)nada.kth.se) and N. J. A. Sloane

A073051 Least k such that Sum_{i=1..k} (prime(i) + prime(i+2) - 2*prime(i+1)) = 2n + 1.

Original entry on oeis.org

1, 3, 8, 23, 33, 45, 29, 281, 98, 153, 188, 262, 366, 428, 589, 737, 216, 1182, 3301, 2190, 1878, 1830, 7969, 3076, 3426, 2224, 3792, 8027, 4611, 4521, 3643, 8687, 14861, 12541, 15782, 3384, 34201, 19025, 17005, 44772, 23282, 38589, 14356
Offset: 1

Views

Author

Robert G. Wilson v, Aug 15 2002

Keywords

Comments

Also, least k such that 2n = A001223(k-1) = prime(k+1) - prime(k), where prime(k) = A001223(n). - Alexander Adamchuk, Jul 30 2006
Also the least number k>0 such that the k-th maximal run of composite numbers has length 2n-1. For example, the 8th such run (24,25,26,27,28) is the first of length 2(3)-1, so a(3) = 8. Also positions of first appearances in A176246 (A046933 without first term). - Gus Wiseman, Jun 12 2024

Examples

			a(3) = 8 because 1+0+2-2+2-2+2+2 = 5 and (5+1)/2 = 3.
		

Crossrefs

Position of first appearance of 2n+1 in A176246.
For nonsquarefree runs we have a bisection of A373199.
A000040 lists the primes, first differences A001223.
A002808 lists the composite numbers, differences A073783, sums A053767.
A046933 counts composite numbers between primes.
A065855 counts composite numbers up to n.

Programs

  • Mathematica
    NextPrim[n_Integer] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; a = Table[0, {50}]; s = 0; k = 1; p = 0; q = 2; r = 3; While[k < 10^6, p = q; q = r; r = NextPrim[q]; s = s + p + r - 2q; If[s < 101 && a[[(s + 1)/2]] == 0, a[[(s + 1)/2]] = k]; k++ ]; a
  • PARI
    a001223(n) = prime(n+1) - prime(n);
    a(n) = {my(k = 1); while(2*n != A001223(k+1), k++); k;} \\ Michel Marcus, Nov 20 2016

Formula

a(n) = A038664(n) - 1. - Filip Zaludek, Nov 19 2016

A373404 Sum of the n-th maximal antirun of composite numbers differing by more than one.

Original entry on oeis.org

18, 9, 36, 15, 54, 21, 46, 25, 26, 27, 90, 33, 34, 35, 74, 39, 126, 45, 94, 49, 50, 51, 106, 55, 56, 57, 180, 63, 64, 65, 134, 69, 216, 75, 76, 77, 158, 81, 166, 85, 86, 87, 178, 91, 92, 93, 94, 95, 194, 99, 306, 105, 324, 111, 226, 115, 116, 117, 118, 119
Offset: 1

Views

Author

Gus Wiseman, Jun 05 2024

Keywords

Comments

The length of this antirun is given by A373403.
An antirun of a sequence (in this case A002808) is an interval of positions at which consecutive terms differ by more than one.

Examples

			Row sums 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

Partial sums are a subset of A053767 (partial sums of composite numbers).
Functional neighbors: A005381, A054265, A068780, A373403, A373405, A373411, A373412.
A000040 lists the primes, differences A001223.
A002808 lists the composite numbers, differences A073783.
A046933 counts composite numbers between primes.
A065855 counts composite numbers up to n.

Programs

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

A141092 Product of first k composite numbers divided by their sum, when the result is an integer.

Original entry on oeis.org

1, 64, 46080, 111974400, 662171811840, 310393036800000, 7230916185292800, 108238138194410864640000, 23835710455777670400935290994688000000000, 1104077556971139123493322971152384000000000
Offset: 1

Views

Author

Enoch Haga, Jun 01 2008

Keywords

Comments

Find the products and sums of first k composites, k = 1, 2, 3, .... When the products divided by the sums produce integral quotients, add terms to sequence.

Examples

			a(3)=46080 because 4*6*8*9*10*12*14=2903040 and 4+6+8+9+10+12+14=63; 2903040/63=46080, which is an integer, so 46080 is a term.
		

Crossrefs

Programs

  • Haskell
    import Data.Maybe (catMaybes)
    a141092 n = a141092_list !! (n-1)
    a141092_list = catMaybes $ zipWith div' a036691_list a053767_list where
       div' x y | m == 0    = Just x'
                | otherwise = Nothing where (x',m) = divMod x y
    -- Reinhard Zumkeller, Oct 03 2011
    
  • Mathematica
    With[{cnos=Select[Range[50],CompositeQ]},Select[Table[Fold[ Times,1,Take[ cnos,n]]/ Total[Take[cnos,n]],{n,Length[cnos]}],IntegerQ]] (* Harvey P. Dale, Jan 14 2015 *)
  • PARI
    s=0;p=1;forcomposite(n=4,100,p*=n;s+=n;if(p%s==0,print1(p/s", "))) \\ Charles R Greathouse IV, Apr 04 2013

Formula

a(n) = A036691(A196415(n)) / A053767(A196415(n)). [Reinhard Zumkeller, Oct 03 2011]

Extensions

Checked by N. J. A. Sloane, Oct 02 2011.

A013921 Composite numbers that are equal to the sum of the first k composites for some k.

Original entry on oeis.org

4, 10, 18, 27, 49, 63, 78, 94, 112, 132, 153, 175, 224, 250, 305, 335, 400, 434, 469, 505, 543, 582, 622, 664, 708, 753, 799, 847, 896, 946, 1158, 1214, 1271, 1329, 1389, 1514, 1578, 1643, 1846, 1916, 1988, 2062, 2290, 2368, 2448, 2529, 2611, 2695, 2780, 2866
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Module[{nn=100,comps},comps=Complement[Range[4,nn],Prime[ Range[ PrimePi[ nn]]]]; Select[Accumulate[comps],!PrimeQ[#]&]] (* Harvey P. Dale, May 21 2014 *)
  • PARI
    isok(c) = if ((c>1) && !isprime(c), my(s=0); forcomposite(x=1, oo, s+=x; if (s == c, return(1)); if (s > c, return(0)))); \\ Michel Marcus, Nov 25 2022

Formula

a(n) = A053767(A013919(n)). [Found by LODA miner] - Christian Krause, Nov 24 2022

Extensions

More terms from David W. Wilson
Name edited by Michel Marcus, Nov 25 2022

A196415 Values of n such that (product of first n composite numbers) / (sum of first n composite numbers) is an integer.

Original entry on oeis.org

1, 4, 7, 10, 13, 15, 16, 21, 32, 33, 56, 57, 60, 70, 77, 80, 83, 84, 88, 92, 93, 97, 112, 114, 115, 120, 122, 130, 134, 141, 147, 153, 155, 164, 165, 188, 191, 196, 201, 202, 213, 222, 225, 226, 229, 243, 245, 248, 252, 260, 264, 265, 268, 273, 274, 281
Offset: 1

Views

Author

N. J. A. Sloane, Oct 02 2011

Keywords

Comments

A036691(a(n)) mod A053767(a(n)) = 0, A141092(n) = A036691(a(n)) / A053767(a(n)). [Reinhard Zumkeller, Oct 03 2011]

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndices)
    a196415 n = a196415_list !! (n-1)
    a196415_list =
       map (+ 1) $ elemIndices 0 $ zipWith mod a036691_list a053767_list
    -- Reinhard Zumkeller, Oct 03 2011
  • Maple
    # First define list of composite numbers:
    tc:=[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,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];
    a1:=n->mul(tc[i],i=1..n);
    a2:=n->add(tc[i],i=1..n);
    sn:=[];
    s0:=[];
    s1:=[];
    s2:=[];
    for n from 1 to 40 do
      t1:=a1(n)/a2(n);
      if whattype(t1) = integer then
       sn:= [op(sn),n];
       s0:= [op(s0),t1];
       s1:= [op(s1),a1(n)];
       s2:= [op(s2),a2(n)];
    fi;
    od:
    sn; s0; s1; s2;
    # alternatively
    for n from 1 to 1000 do
            if type(A036691(n)/A053767(n),'integer') then
                    printf("%d,",n);
            end if;
    end do: # R. J. Mathar, Oct 03 2011
  • Mathematica
    c = Select[Range[2,355], ! PrimeQ@# &]; p = 1; s = 0; Select[Range@ Length@c, Mod[p *= c[[#]], s += c[[#]]] == 0 &] (* Giovanni Resta, Apr 03 2013 *)

Extensions

More terms from Arkadiusz Wesolowski, Oct 03 2011

A053781 Numbers k that divide the sum of the first k composite numbers.

Original entry on oeis.org

1, 2, 3, 7, 11, 71, 107, 115, 139, 155, 681, 1671, 4876, 21464, 30046, 311271, 788749, 10893662, 20743270, 134568163, 163879554, 920161004, 6364787032, 21400458779, 47934932406, 56133884369, 288050185452, 536023681676, 1484061538595
Offset: 1

Views

Author

G. L. Honaker, Jr., Mar 29 2000

Keywords

Crossrefs

Programs

  • Mathematica
    c = s = 0; Do[ If[ !PrimeQ[n], c++; s = s + n; If[ Mod[s, c] == 0, Print[c]]], {n, 2, 10^9}] (* Robert G. Wilson v, Nov 23 2004 *)
  • PARI
    lista(nn) = {s = 0; n = 0; forcomposite(c=0, nn, s += c; n++; if (! (s % n), print1(n, ", ")););} \\ Michel Marcus, Mar 15 2015

Formula

Numbers k such that k divides A053767(k). - Robert G. Wilson v, Nov 24 2004

Extensions

a(19)-a(22) from Robert G. Wilson v, Nov 24 2004
a(23)-a(26) from Sean A. Irvine, Oct 01 2009
a(27)-a(29) from Donovan Johnson, Jul 06 2010

A154587 Numbers that can be expressed both as the sum of first prime numbers and as the sum of first nonprime numbers.

Original entry on oeis.org

0, 5, 28, 71208, 74139, 9260197734, 12374540078, 7574780746329, 11101148723618, 102581905748236, 3325997869054417, 2886018916559052244845, 46437379006448216748610, 120197329614203475099994
Offset: 1

Views

Author

Keywords

Comments

Is this sequence finite?
Intersection of A007504 and A053767 generates A294174. - R. J. Mathar, Jan 17 2009
Heuristically, the sequence is infinite with about 2 sqrt(log x) members up to x. - Charles R Greathouse IV, Aug 14 2013

Examples

			5 = 2+3 = 1+4. 28 = 2+3+5+7+11 = 1+4+6+8+9.
		

Crossrefs

Intersection of A007504 and A051349. - R. J. Mathar, Jan 17 2009

Programs

  • Maple
    P:=proc(q) local a,b,c,d,n; a:=0; b:=0; c:=0; d:=0; print(a);
    for n from 1 to q do b:=nextprime(b); a:=a+b;
    while cPaolo P. Lava, Feb 23 2018
  • Mathematica
    With[{p = Prime@ Range[10^7]}, {0}~Join~Intersection[Accumulate@ p, Accumulate@ Complement[Range@ Max@ p, p]]] (* Michael De Vlieger, Feb 25 2018 *)

Extensions

Corrected definition and a(6)-a(7) from R. J. Mathar, Jan 17 2009
a(8)-a(11) from Donovan Johnson, Feb 19 2009
a(12)-a(14) from Giovanni Resta, Aug 14 2013
Edited and a(1)=0 prepended by Max Alekseyev, Feb 10 2018

A196527 Greatest common divisor of sums of first n prime numbers and first n composite numbers.

Original entry on oeis.org

2, 5, 2, 1, 1, 1, 1, 1, 2, 1, 4, 1, 7, 1, 8, 1, 1, 1, 1, 1, 8, 7, 1, 1, 1, 3, 2, 1, 4, 3, 1, 1, 28, 1, 1, 1, 1, 1, 2, 1, 1, 3, 1, 1, 2, 1, 1, 1, 26, 1, 2, 1, 1, 1, 2, 1, 6, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 4, 1, 1, 1, 1, 1, 10, 1, 2, 1, 1, 1, 1, 3, 8
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 03 2011

Keywords

Comments

a(n) = gcd(A007504(n),A053767(n));
a(A196528(n)) = n and a(m) <> n for m < A196528(n).

Examples

			a(1) = gcd(2,4) = 2;
a(2) = gcd(2+3,4+6) = gcd(5,10) = 5;
a(3) = gcd(2+3+5,4+6+8) = gcd(10,18) = 2;
a(4) = gcd(2+3+5+7,4+6+8+9) = gcd(17,19) = 1.
		

Crossrefs

Cf. A196529.

Programs

  • Mathematica
    Module[{nn=90,pr,cmp},pr=Accumulate[Prime[Range[nn]]];cmp=Accumulate[ Take[Select[Range[2nn],CompositeQ],nn]];GCD@@#&/@Thread[{pr,cmp}]] (* Harvey P. Dale, Jul 29 2017 *)
Showing 1-10 of 22 results. Next