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

A055938 Integers not generated by b(n) = b(floor(n/2)) + n (complement of A005187).

Original entry on oeis.org

2, 5, 6, 9, 12, 13, 14, 17, 20, 21, 24, 27, 28, 29, 30, 33, 36, 37, 40, 43, 44, 45, 48, 51, 52, 55, 58, 59, 60, 61, 62, 65, 68, 69, 72, 75, 76, 77, 80, 83, 84, 87, 90, 91, 92, 93, 96, 99, 100, 103, 106, 107, 108, 111, 114, 115, 118, 121, 122, 123, 124, 125, 126, 129
Offset: 1

Views

Author

Alford Arnold, Jul 21 2000

Keywords

Comments

Note that the lengths of the consecutive runs in a(n) form sequence A001511.
Integers that are not a sum of distinct integers of the form 2^k-1. - Vladeta Jovovic, Jan 24 2003
Also n! never ends in this many 0's in base 2 - Carl R. White, Jan 21 2008
A079559(a(n)) = 0. - Reinhard Zumkeller, Mar 18 2009
These numbers are dead-end points when trying to apply the iterated process depicted in A071542 in reverse, i.e. these are positive integers i such that there does not exist k with A000120(i+k)=k. See also comments at A179016. - Antti Karttunen, Oct 26 2012
Conjecture: a(n)=b(n) defined as b(1)=2, for n>1, b(n+1)=b(n)+1 if n is already in the sequence, b(n+1)=b(n)+3 otherwise. If so, then see Cloitre comment in A080578. - Ralf Stephan, Dec 27 2013
Numbers n for which A257265(m) = 0. - Reinhard Zumkeller, May 06 2015. Typo corrected by Antti Karttunen, Aug 08 2015
Numbers which have a 2 in their skew-binary representation (cf. A169683). - Allan C. Wechsler, Feb 28 2025

Examples

			Since A005187 begins 0 1 3 4 7 8 10 11 15 16 18 19 22 23 25 26 31... this sequence begins 2 5 6 9 12 13 14 17 20 21
		

Crossrefs

Complement of A005187. Setwise difference of A213713 and A213717.
Row 1 of arrays A257264, A256997 and also of A255557 (when prepended with 1). Equally: column 1 of A256995 and A255555.
Cf. also arrays A254105, A254107 and permutations A233276, A233278.
Left inverses: A234017, A256992.
Gives positions of zeros in A213714, A213723, A213724, A213731, A257265, positions of ones in A213725-A213727 and A256989, positions of nonzeros in A254110.
Cf. also A010061 (integers that are not a sum of distinct integers of the form 2^k+1).
Analogous sequence for factorial base number system: A219658, for Fibonacci number system: A219638, for base-3: A096346. Cf. also A136767-A136774.

Programs

  • Haskell
    a055938 n = a055938_list !! (n-1)
    a055938_list = concat $
       zipWith (\u v -> [u+1..v-1]) a005187_list $ tail a005187_list
    -- Reinhard Zumkeller, Nov 07 2011
    
  • Mathematica
    a[0] = 0; a[1] = 1; a[n_Integer] := a[Floor[n/2]] + n; b = {}; Do[ b = Append[b, a[n]], {n, 0, 105}]; c =Table[n, {n, 0, 200}]; Complement[c, b]
    (* Second program: *)
    t = Table[IntegerExponent[(2n)!, 2], {n, 0, 100}]; Complement[Range[t // Last], t] (* Jean-François Alcover, Nov 15 2016 *)
  • PARI
    L=listcreate();for(n=1,1000,for(k=2*n-hammingweight(n)+1,2*n+1-hammingweight(n+1),listput(L,k)));Vec(L) \\ Ralf Stephan, Dec 27 2013
    
  • Python
    def a053644(n): return 0 if n==0 else 2**(len(bin(n)[2:]) - 1)
    def a043545(n):
        x=bin(n)[2:]
        return int(max(x)) - int(min(x))
    def a079559(n): return 1 if n==0 else a043545(n + 1)*a079559(n + 1 - a053644(n + 1))
    print([n for n in range(1, 201) if a079559(n)==0]) # Indranil Ghosh, Jun 11 2017, after the comment by Reinhard Zumkeller
  • Scheme
    ;; utilizing COMPLEMENT-macro from Antti Karttunen's IntSeq-library)
    (define A055938 (COMPLEMENT 1 A005187))
    ;; Antti Karttunen, Aug 08 2015
    

Formula

a(n) = A080578(n+1) - 2 = A080468(n+1) + 2*n (conjectured). - Ralf Stephan, Dec 27 2013
From Antti Karttunen, Aug 08 2015: (Start)
Other identities. For all n >= 1:
A234017(a(n)) = n.
A256992(a(n)) = n.
A257126(n) = a(n) - A005187(n).
(End)

Extensions

More terms from Robert G. Wilson v, Jul 24 2000

A054861 Greatest k such that 3^k divides n!.

Original entry on oeis.org

0, 0, 0, 1, 1, 1, 2, 2, 2, 4, 4, 4, 5, 5, 5, 6, 6, 6, 8, 8, 8, 9, 9, 9, 10, 10, 10, 13, 13, 13, 14, 14, 14, 15, 15, 15, 17, 17, 17, 18, 18, 18, 19, 19, 19, 21, 21, 21, 22, 22, 22, 23, 23, 23, 26, 26, 26, 27, 27, 27, 28, 28, 28, 30, 30, 30, 31, 31, 31, 32, 32, 32, 34, 34, 34, 35, 35
Offset: 0

Views

Author

Henry Bottomley, May 22 2000

Keywords

Comments

Also the number of trailing zeros in the base-3 representation of n!. - Hieronymus Fischer, Jun 18 2007
Also the highest power of 6 dividing n!. - Hieronymus Fischer, Aug 14 2007
A column of A090622. - Alois P. Heinz, Oct 05 2012
The 'missing' values are listed in A096346. - Stanislav Sykora, Jul 16 2014

Examples

			a(100) = 48.
a(10^3) = 498.
a(10^4) = 4996.
a(10^5) = 49995.
a(10^6) = 499993.
a(10^7) = 4999994.
a(10^8) = 49999990.
a(10^9) = 499999993.
		

Crossrefs

Cf. A011371 (for analog involving powers of 2). See also A027868.
Cf. A004128 (for a(3n)).

Programs

Formula

a(n) = floor(n/3) + floor(n/9) + floor(n/27) + floor(n/81) + ... .
a(n) = (n - A053735(n))/2.
a(n+1) = Sum_{k=1..n} A007949(k). - Benoit Cloitre, Mar 24 2002
From Hieronymus Fischer, Jun 18, Jun 25 and Aug 14 2007: (Start)
G.f.: (1/(1-x))*Sum_{k>0} x^(3^k)/(1-x^(3^k)).
a(n) = Sum_{k=3..n} Sum_{j>=3, j|k} (floor(log_3(j)) - floor(log_3(j-1))).
G.f.: L[b(k)](x)/(1-x), where L[b(k)](x) = Sum_{k>=0} b(k)*x^k/(1-x^k) is a Lambert series with b(k) = 1, if k>1 is a power of 3, otherwise b(k)=0.
G.f.: (1/(1-x))*Sum_{k>0} c(k)*x^k, where c(k) = Sum_{j>1, j|k} (floor(log_3(j)) - floor(log_3(j-1))).
Recurrence:
a(n) = floor(n/3) + a(floor(n/3));
a(3*n) = n + a(n);
a(n*3^m) = n*(3^m-1)/2 + a(n).
a(k*3^m) = k*(3^m-1)/2, for 0 <= k < 3, m >= 0.
Asymptotic behavior:
a(n) = n/2 + O(log(n)),
a(n+1) - a(n) = O(log(n)); this follows from the inequalities below.
a(n) <= (n-1)/2; equality holds for powers of 3.
a(n) >= (n-2)/2 - floor(log_3(n)); equality holds for n = 3^m - 1, m > 0.
lim inf (n/2 - a(n)) = 1/2 for n->oo.
lim sup (n/2 - log_3(n) - a(n)) = 0 for n->oo.
lim sup (a(n+1) - a(n) - log_3(n)) = 0 for n->oo. (End)
a(n) = A007949(n!). - R. J. Mathar, Sep 03 2016
From R. J. Mathar, Jul 08 2021: (Start)
a(n) = A122841(n!).
Partial sums of A007949. (End)
a(n) = A007949(A000142(n)). - David A. Corneth, Nov 02 2023

Extensions

Examples added by Hieronymus Fischer, Jun 06 2012
New name by David A. Corneth, Nov 02 2023

A000966 n! never ends in this many 0's.

Original entry on oeis.org

5, 11, 17, 23, 29, 30, 36, 42, 48, 54, 60, 61, 67, 73, 79, 85, 91, 92, 98, 104, 110, 116, 122, 123, 129, 135, 141, 147, 153, 154, 155, 161, 167, 173, 179, 185, 186, 192, 198, 204, 210, 216, 217, 223, 229, 235, 241, 247, 248, 254, 260, 266, 272, 278, 279, 285
Offset: 1

Views

Author

Keywords

Comments

This sequence also holds for bases 5, 15, 20, 30, 40, 60 and 120. These bases (together with 10) are the proper divisors of 5! that are divisible by 5. - Carl R. White, Jan 21 2008
The g.f. conjectured by Simon Plouffe in 1992 dissertation is not correct; the first discrepancy is a(31) = 155, his g.f. gives 160. In fact, the g.f. for this sequence is not rational; the first differences are bounded but not periodic. - Franklin T. Adams-Watters, Jul 03 2009
a(n+1) - a(n) = 1 or 6: Let k be the smallest number such that (5*k)! ends in at least a(n)+1 zeros, then k is a multiple of 5, otherwise (5*(k-1))! would end in at least a(n) zeros, either contradicting with the minimality of k or with the fact that a(n) is a term. If (5*k)! ends in exactly a(n)+1 zeros, then the next term after a(n) is a(n)+6, otherwise it is a(n)+1. - Jianing Song, Apr 13 2022
The positions of 1 in the sequence of first differences (A080066) is, itself, a(n), so the sequence is "self-generating", starting from a(1) = 5. - Paul C Abbott, May 12 2025

Examples

			17 is in the sequence because on passing from 74! to 75!, the number of end zeros jumps from 16 to 18, skipping 17.
More generally, we have:
  n, n!
  -----
  0, 1
  1, 1
  2, 2
  3, 6
  4, 24
  5, 120
  6, 720
  7, 5040
  8, 40320
  9, 362880
 10, 3628800
 11, 39916800
 12, 479001600
 13, 6227020800
 14, 87178291200
 15, 1307674368000
 16, 20922789888000
 17, 355687428096000
 18, 6402373705728000
 19, 121645100408832000
 20, 2432902008176640000
 21, 51090942171709440000
 22, 1124000727777607680000
 23, 25852016738884976640000
 24, 620448401733239439360000
 25, 15511210043330985984000000 <- jump from 4 to 6 trailing 0's, so 5 is a term
 26, 403291461126605635584000000
 27, 10888869450418352160768000000
 28, 304888344611713860501504000000
 29, 8841761993739701954543616000000
 30, 265252859812191058636308480000000
 ...
		

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers (Rev. ed. 1997), p. 42

Crossrefs

Cf. A000142, A027868, A080066 (first differences), A191610 (complement), A096346 (same for base 3), A055938 (same for base 2), A136767-A136774.

Programs

  • Maple
    read(transforms); e:=n->(5^n-1)/4; f:=n->(1-x^(e(n)-1))/(1-x^e(n-1)); t:=n->x^(e(n)-6); A[2]:=1; for n from 3 to 8 do A[n]:=f(n)*A[n-1]+t(n); od: POWERS(series(x^5*A[8],x,5005),x,5005); # N. J. A. Sloane, Feb 02 2007
  • Mathematica
    u=Union@Accumulate@IntegerExponent[Range[1000],5]; Complement[Range[Last@u], u] (* T. D. Noe, Feb 02 2007, and Paul C Abbott, May 12 2025 *)
    zOF[n_Integer?Positive]:=Module[{maxpow=0},While[5^maxpow<=n,maxpow++];Plus@@Table[Quotient[n,5^i],{i,maxpow-1}]]; Attributes[ zOF] = {Listable}; nmz[n_]:=Module[{zs=zOF[Range[n]]},Complement[ Range[ Max[zs]],zs]]; nmz[2000] (* Harvey P. Dale, Mar 05 2017 *)
    a[1]=5; d[n_]:=a[n+1]=a[n]+1; a[n_]:=a[n]=a[n-1]+6; (n|->d[a[n]])/@Range[40];a/@Range[a[40]+ 1] (* Paul C Abbott, May 12 2025 *)
  • PARI
    valp(n,p)=my(s); while(n\=p, s+=n); s
    is(n)=my(t=(4*n-1)\5*5+5, s=valp(t,5)-n); while(s<0, s+=valuation(t+=5, 5)); s>0 \\ Charles R Greathouse IV, Sep 22 2016
    
  • Python
    from itertools import count, islice
    def val(n, p):
        e = 0
        while n%p == 0: n //= p; e += 1
        return e
    def agen(): # generator of terms
        fi, nz, z = 1, 0, 0
        for i in count(1):
            fi *= 2**val(i, 2) * 5**val(i, 5)
            z = val(fi, 10)
            for k in range(nz+1, nz+z): yield k
            nz += z
            fi //= 10**z
    print(list(islice(agen(), 56))) # Michael S. Branicky, Apr 13 2022

Formula

The simplest way to obtain this sequence is by constructing a power series A(x) = Sum_{k >= 1} x^a(k) whose exponents give the terms of the sequence. Define e(n) = (5^n-1)/4, f(n) = (1-x^(e(n)-1))/(1-x^e(n-1)), t(n) = x^(e(n)-6).
Now use the recurrence A[2] = 1 and for n >= 3, A[n] = f(n)*A[n-1]+t(n); then A = limit_{n->infinity} x^5*A[n]. This follows easily from the explicit formula for A027868(n). Here is the beginning of A: x^5 + x^11 + x^17 + x^23 + x^29 + x^30 + x^36 + x^42 + x^48 + ... - N. J. A. Sloane, Feb 02 2007
Formula from C. W. Trigg (see the Moser reference): All terms can be described as follows: for k = 1, 2, 3, ..., the number 6k-1 + floor(k/5) + floor(k/5^2) + floor(k/5^3) + ... is a term together with A112765(k) preceding numbers. [corrected and simplified by Gerald Hillier and Andrey Zabolotskiy, Sep 13 2017]

Extensions

More terms from Mark Hudson (mrmarkhudson(AT)hotmail.com), Jan 24 2003
Corrected by Sascha Kurz, Jan 27 2003

A136774 n! never ends in this many 0's in base 16.

Original entry on oeis.org

62, 94, 110, 118, 126, 158, 174, 182, 190, 206, 214, 222, 230, 238, 254, 286, 302, 310, 318, 334, 342, 350, 358, 366, 382, 398, 406, 414, 422, 430, 446, 454, 462, 478, 510, 542, 558, 566, 574, 590, 598, 606, 614, 622, 638, 654, 662, 670, 678, 686, 702, 710
Offset: 1

Views

Author

Carl R. White, Jan 21 2008

Keywords

Crossrefs

Programs

  • PARI
    is(n)=my(t=4*n+2,s=1-hammingweight(n)); while(s<0, s+=valuation(t+=2,2)); s>3 \\ Charles R Greathouse IV, Sep 22 2016

Formula

Conjecture: a(n) ~ 16n. This holds with probability 1 in a random model. - Charles R Greathouse IV, Sep 22 2016

A136767 n! never ends in this many 0's in base 4.

Original entry on oeis.org

6, 10, 14, 18, 22, 29, 30, 34, 38, 45, 46, 53, 57, 61, 62, 66, 70, 77, 78, 85, 89, 93, 94, 101, 105, 109, 113, 117, 124, 125, 126, 130, 134, 141, 142, 149, 153, 157, 158, 165, 169, 173, 177, 181, 188, 189, 190, 197, 201, 205, 209, 213, 220, 221, 225, 229, 236
Offset: 1

Views

Author

Carl R. White, Jan 21 2008

Keywords

Crossrefs

A136773 n! never ends in this many 0's in base 13.

Original entry on oeis.org

13, 27, 41, 55, 69, 83, 97, 111, 125, 139, 153, 167, 181, 182, 196, 210, 224, 238, 252, 266, 280, 294, 308, 322, 336, 350, 364, 365, 379, 393, 407, 421, 435, 449, 463, 477, 491, 505, 519, 533, 547, 548, 562, 576, 590, 604, 618, 632, 646, 660, 674, 688, 702
Offset: 1

Views

Author

Carl R. White, Jan 21 2008

Keywords

Crossrefs

Programs

  • PARI
    valp(n, p)=my(s); while(n\=p, s+=n); s
    is(n)=my(t=(12*n-1)\13*13+13,s=valp(t,13)-n); while(s<0, s+=valuation(t+=13, 13)); s>0 \\ Charles R Greathouse IV, Oct 19 2016

A136768 n! never ends in this many 0's in base 7.

Original entry on oeis.org

7, 15, 23, 31, 39, 47, 55, 56, 64, 72, 80, 88, 96, 104, 112, 113, 121, 129, 137, 145, 153, 161, 169, 170, 178, 186, 194, 202, 210, 218, 226, 227, 235, 243, 251, 259, 267, 275, 283, 284, 292, 300, 308, 316, 324, 332, 340, 341, 349, 357, 365, 373, 381, 389, 397
Offset: 1

Views

Author

Carl R. White, Jan 21 2008

Keywords

Comments

Also: n! never ends in this many 0's in base 14, 21, 28 and all other 7-divisible proper factors of 7!

Crossrefs

A136769 n! never ends in this many 0's in base 8.

Original entry on oeis.org

4, 9, 20, 25, 30, 41, 62, 83, 84, 89, 94, 105, 110, 115, 126, 147, 168, 169, 190, 211, 222, 227, 232, 243, 248, 253, 254, 275, 296, 307, 312, 317, 328, 333, 338, 339, 340, 345, 350, 361, 366, 371, 382, 403, 424, 425, 430, 435, 446, 451, 456, 467, 488, 509, 510
Offset: 1

Views

Author

Carl R. White, Jan 21 2008

Keywords

Crossrefs

A136770 n! never ends in this many 0's in base 9.

Original entry on oeis.org

12, 19, 32, 39, 52, 59, 66, 79, 86, 99, 106, 119, 120, 133, 140, 153, 160, 173, 180, 181, 194, 201, 214, 221, 234, 241, 248, 261, 268, 281, 288, 301, 302, 315, 322, 335, 342, 355, 362, 363, 376, 383, 396, 403, 416, 423, 430, 443, 450, 463, 470, 483, 484, 497
Offset: 1

Views

Author

Carl R. White, Jan 21 2008

Keywords

Crossrefs

Programs

  • Mathematica
    Module[{nn=5000,zd},zd=Union[Table[Length[Last[Split[IntegerDigits[n!,9]]]],{n,nn}]];Complement[ Range[Max[zd]],zd]] (* Harvey P. Dale, Dec 26 2023 *)

A136771 n! never ends in this many 0's in base 11.

Original entry on oeis.org

11, 23, 35, 47, 59, 71, 83, 95, 107, 119, 131, 132, 144, 156, 168, 180, 192, 204, 216, 228, 240, 252, 264, 265, 277, 289, 301, 313, 325, 337, 349, 361, 373, 385, 397, 398, 410, 422, 434, 446, 458, 470, 482, 494, 506, 518, 530, 531, 543, 555, 567, 579, 591
Offset: 1

Views

Author

Carl R. White, Jan 21 2008

Keywords

Crossrefs

Showing 1-10 of 12 results. Next