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

A326788 BII-numbers of simple labeled graphs.

Original entry on oeis.org

0, 4, 16, 20, 32, 36, 48, 52, 256, 260, 272, 276, 288, 292, 304, 308, 512, 516, 528, 532, 544, 548, 560, 564, 768, 772, 784, 788, 800, 804, 816, 820, 2048, 2052, 2064, 2068, 2080, 2084, 2096, 2100, 2304, 2308, 2320, 2324, 2336, 2340, 2352, 2356, 2560, 2564
Offset: 1

Views

Author

Gus Wiseman, Jul 25 2019

Keywords

Comments

A binary index of n is any position of a 1 in its reversed binary expansion. The binary indices of n are row n of A048793. We define the set-system with BII-number n to be obtained by taking the binary indices of each binary index of n. Every finite set of finite nonempty sets has a different BII-number. For example, 18 has reversed binary expansion (0,1,0,0,1), and since the binary indices of 2 and 5 are {2} and {1,3} respectively, the BII-number of {{2},{1,3}} is 18. Elements of a set-system are sometimes called edges.
Also numbers whose binary indices all belong to A018900.

Examples

			The sequence of all simple labeled graphs together with their BII-numbers begins:
    0: {}
    4: {{1,2}}
   16: {{1,3}}
   20: {{1,2},{1,3}}
   32: {{2,3}}
   36: {{1,2},{2,3}}
   48: {{1,3},{2,3}}
   52: {{1,2},{1,3},{2,3}}
  256: {{1,4}}
  260: {{1,2},{1,4}}
  272: {{1,3},{1,4}}
  276: {{1,2},{1,3},{1,4}}
  288: {{2,3},{1,4}}
  292: {{1,2},{2,3},{1,4}}
  304: {{1,3},{2,3},{1,4}}
  308: {{1,2},{1,3},{2,3},{1,4}}
  512: {{2,4}}
  516: {{1,2},{2,4}}
  528: {{1,3},{2,4}}
  532: {{1,2},{1,3},{2,4}}
		

Crossrefs

Other BII-numbers: A309314 (hyperforests), A326701 (set partitions), A326703 (chains), A326704 (antichains), A326749 (connected), A326750 (clutters), A326751 (blobs), A326752 (hypertrees), A326754 (covers).

Programs

  • Mathematica
    bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    Select[Range[0,100],SameQ[2,##]&@@Length/@bpe/@bpe[#]&]

A334101 Numbers of the form q*(2^k), where q is one of the Fermat primes and k >= 0; Numbers n for which A329697(n) == 1.

Original entry on oeis.org

3, 5, 6, 10, 12, 17, 20, 24, 34, 40, 48, 68, 80, 96, 136, 160, 192, 257, 272, 320, 384, 514, 544, 640, 768, 1028, 1088, 1280, 1536, 2056, 2176, 2560, 3072, 4112, 4352, 5120, 6144, 8224, 8704, 10240, 12288, 16448, 17408, 20480, 24576, 32896, 34816, 40960, 49152, 65537, 65792, 69632, 81920, 98304, 131074, 131584, 139264
Offset: 1

Views

Author

Antti Karttunen, Apr 14 2020

Keywords

Comments

Numbers k that themselves are not powers of two, but for which A171462(k) = k-A052126(k) is [a power of 2].
Numbers k such that A000265(k) is in A019434.
Squares of these numbers can be found (as a subset) in A334102, and the cubes (as a subset) in A334103.

Crossrefs

Row 1 of A334100.
Cf. A019434 (primes present), A007283, A020714, A110287 (other subsequences).
Subsequence of A018900.

Programs

Formula

For all n, A000120(a(n)) = 2.

A226636 Numbers whose base-3 sum of digits is 3.

Original entry on oeis.org

5, 7, 11, 13, 15, 19, 21, 29, 31, 33, 37, 39, 45, 55, 57, 63, 83, 85, 87, 91, 93, 99, 109, 111, 117, 135, 163, 165, 171, 189, 245, 247, 249, 253, 255, 261, 271, 273, 279, 297, 325, 327, 333, 351, 405, 487, 489, 495, 513, 567, 731, 733, 735, 739, 741, 747, 757
Offset: 1

Views

Author

Tom Edgar, Aug 31 2013

Keywords

Comments

All of the entries are odd.
Subsequence of A005408. - Michel Marcus, Sep 03 2013
In general, the set of numbers with sum of base-b digits equal to b is a subset of { (b-1)*k + 1; k = 2, 3, 4, ... }. - M. F. Hasler, Dec 23 2016

Examples

			The ternary expansion of 5 is (1,2), which has sum of digits 3.
The ternary expansion of 31 is (1,0,0,2), which has sum of digits 3.
10 is not on the list since the ternary expansion of 10 is (1,0,1), which has sum of digits 2 not 3.
		

Crossrefs

Cf. A226969 (b = 4), A227062 (b = 5), A227080 (b = 6), A227092 (b = 7), A227095 (b = 8), A227238 (b = 9), A052224 (b = 10).

Programs

  • Maple
    N:= 10: # for all terms < 3^(N+1)
    [seq(seq(seq(3^a+3^b+3^c, c=0..`if`(b=a, b-1,b)),b = 0..a),a=0..N)]; # Robert Israel, Jun 05 2018
  • Mathematica
    Select[Range@ 757, Total@ IntegerDigits[#, 3] == 3 &] (* Michael De Vlieger, Dec 23 2016 *)
  • PARI
    select( is(n)=sumdigits(n,3)==3, [1..999]) \\ M. F. Hasler, Dec 23 2016
    
  • Python
    from itertools import islice
    def nextsod(n, base):
        c, b, w = 0, base, 0
        while True:
            d = n%b
            if d+1 < b and c:
                return (n+1)*b**w + ((c-1)%(b-1)+1)*b**((c-1)//(b-1))-1
            c += d; n //= b; w += 1
    def A226636gen(sod=3, base=3): # generator of terms for any sod, base
        an = (sod%(base-1)+1)*base**(sod//(base-1))-1
        while True: yield an; an = nextsod(an, base)
    print(list(islice(A226636gen(), 57))) # Michael S. Branicky, Jul 10 2022, generalizing the code by M. F. Hasler in A052224
  • Sage
    [i for i in [0..1000] if sum(Integer(i).digits(base=3))==3]
    

Formula

a(k^3/6 + k^2 + 5*k/6 + j) = 3^(k+1) + A055235(j-1) for 1 <= j <= k^2/2+5*k/2+2. - Robert Israel, Jun 05 2018

A005148 Sequence of coefficients arising in connection with a rapidly converging series for Pi.

Original entry on oeis.org

0, 1, 47, 2488, 138799, 7976456, 467232200, 27736348480, 1662803271215, 100442427373480, 6103747246289272, 372725876150863808, 22852464771010647496, 1405886026610765892544, 86741060172969340021952
Offset: 0

Views

Author

Keywords

Comments

The paper by Newman and Shanks has an appendix by Don Zagier which eventually leads to an efficient recursive algorithm for the series itself, whereas the main paper treats each term in isolation, which is enormously slower. Using Zagier's appendix one may compute 1000 terms in 25 seconds running PARI/GP on a 500MHz Alpha. - David Broadhurst, Jun 17 2002 (see second version of PARI code here)
Conjecture: The following 2 definitions give the same sequence: (1) numbers k such that 8^m is the highest power of 2 dividing a(k), and (2) numbers k such that k has exactly (m+1) 1's in its binary representation. A018900 is the special case m=1. - Benoit Cloitre, Jun 22 2002, edited by Hugo Pfoertner, Aug 21 2021
Conjecture: There are polynomials P_k(x) such that P_k(m) = the constant term of j_m(tau)^k where j_m is modular for the Hecke group G(lambda_m), j_3 is the Klein invariant j with constant term 744, and P_k(x) = a(k+1) times a product of monic polynomials. - Barry Brent, Nov 25 2022

Examples

			G.f. = x + 47*x^2 + 2488*x^3 + 138799*x^4 + 7976456*x^5 + 467232200*x^6 + ...
		

References

  • F. Beukers, Letter to D. Shanks, Mar 13 1984
  • J. M. Borwein and P. B. Borwein, Pi and the AGM, Wiley, 1987, p. 195; see Exercise 6(a).
  • D. Shanks, Solved and unsolved problems in number theory, Chelsea NY, 1985, p. 255-7,276
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

CF. A060236 (reduced mod 3).

Programs

  • Mathematica
    a[n_] := a[n]=(Binomial[2n, n](16^n-Binomial[2n, n]^2))/24-Sum[Binomial[2n-2i, n-i]^3a[i], {i, 0, n-1}]
    a[ n_] := If[ n < 1, 0, SeriesCoefficient[ ComposeSeries[ Series[ ((Pi / (2 EllipticK[m]))^2 / (1 - 2 m) - 1) / 24, {m, 0, n}], InverseSeries[ Series[ (1 - m) m/16, {m, 0, n}]]], {m, 0, n}]]; (* Michael Somos, Jul 06 2014 *)
    a[ n_] := If[ n < 1, 0, SeriesCoefficient[ ComposeSeries[ Series[ ((Pi / (2 EllipticK[m]))^2 / (1 + m) - 1) / 24, {m, 0, n}], InverseSeries[ Series[ -(1 - m)^-2 m/16, {m, 0, n}]]], {m, 0, n}]]; (* Michael Somos, Jul 06 2014 *)
  • PARI
    {a(n) = if( n<1, 0, polcoeff( prod( k=1, (n+1)\2, 1 + x^(2*k - 1), 1 + x *O(x^n))^(24*n), n) / 24)};
    
  • PARI
    {nt=1000; a=[1]; b=[1]; d=1; e=0; g=0; print(1); for(n=2,nt, c=48*(a[n-1]+g)+128*(d-32*e); e=d; d=c; i=(n-1)\2; g=12*if(n%2==0,a[n/2]^2)+24*sum(j=1,i,a[j]*a[n-j]); h=12*if(n%2==0,b[n/2]^2)+24*sum(j=1,i,b[j]*b[n-j]); f=(c+5*h)/n^2-g; a=concat(a,f); b=concat(b,n*f); print(f))} /* Broadhurst 2002 */
    
  • PARI
    {a(n)=if(n<1,0,va[n])} {b(n)=n*a(n)} {doit(nt)= local(c,d,e,g); va=vector(nt); va[1]=1; d=1; e=0; g=0; for(n=2,nt, c=48*(a(n-1)+g)+128*(d-32*e); e=d; d=c; g=12*if(n%2==0,a(n/2)^2)+24*sum(j=1,(n-1)\2,a(j)*a(n-j)); va[n]=(c+5*(12*if(n%2==0,b(n/2)^2)+24*sum(j=1,(n-1)\2,b(j)*b(n-j))))/n^2-g; )}; /* Michael Somos, Nov 05 2002 */
    
  • PARI
    {a(n) = local(an, cb); if( n<1, 0, an = cb = vector(n, i, binomial(2*i, i)); an[1]=1; for(j=2, n, an[j] = (cb[j]*16^j - cb[j]^3) / 24 - sum(i=1, j-1, cb[j-i]^3*an[i])); an[n])}; /* Michael Somos, Mar 09 2004 */

Formula

a(n) = (1/24) * coefficient of x^n in Product_{k>=1} (1+x^(2k-1))^(24n).
Asymptotically (D. Zagier): a(n) = C*(64^n)/sqrt(n)*(1 - a/n + b/n^2 + ...) with C = (sqrt(Pi)/12)*Gamma(3/4)^2/Gamma(1/4)^2 = 0.0168732651....; a = 6*Gamma(3/4)^4/Gamma(1/4)^4 = 0.078300067..., b = 60*Gamma(3/4)^8/Gamma(1/4)^8 - 1/128 = 0.002405668.... - Benoit Cloitre, Jun 22 2002; numerical value of constant "a" corrected by Vaclav Kotesovec, Jul 28 2013
Alternative expressions for these constants: C = Pi^(5/2)/(6*Gamma(1/4)^4), a = 24*Pi^4/Gamma(1/4)^8, b = 960*Pi^8/Gamma(1/4)^16 - 1/128. - Vaclav Kotesovec, Jul 28 2013
A076657(n) = Sum_{i=0..n} binomial(2*n-2*i, n-i)^3 a(i) = (1/24)*binomial(2*n, n)*(16^n-binomial(2*n, n)^2) (Shanks and Beukers). - Ralf Stephan, Oct 24 2002
Expansion of ((Pi / (2 K(q)))^2 / (1 - 2*k(q)^2) - 1) / 24 in powers of (k'(q) * k(q) / 4)^2. [Borwein and Borwein, 6(a)(i)] - Michael Somos, Jul 06 2014
Expansion of ((Pi / (2 K(q)))^2 / (1 + k(q)^2) - 1) / 24 in powers of (k'(q)^-2 * k(q) / 4)^2. [Borwein and Borwein, 6(a)(ii)] - Michael Somos, Jul 06 2014

Extensions

More terms from Michael Somos, Nov 24 2001

A081118 Triangle of first n numbers per row having exactly n 1's in binary representation.

Original entry on oeis.org

1, 3, 5, 7, 11, 13, 15, 23, 27, 29, 31, 47, 55, 59, 61, 63, 95, 111, 119, 123, 125, 127, 191, 223, 239, 247, 251, 253, 255, 383, 447, 479, 495, 503, 507, 509, 511, 767, 895, 959, 991, 1007, 1015, 1019, 1021, 1023, 1535, 1791, 1919, 1983, 2015, 2031, 2039, 2043
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 06 2003

Keywords

Comments

T(n,n) = A036563(n+1) = 2^(n+1) - 3.
Numbers of the form 2^t - 2^k - 1, 1 <= k < t.

Examples

			Triangle begins:
.......... 1 ......... ................ 1
........ 3...5 ....... .............. 11 101
...... 7..11..13 ..... .......... 111 1011 1101
... 15..23..27..29 ... ...... 1111 10111 11011 11101
. 31..47..55..59..61 . . 11111 101111 110111 111011 111101.
		

Crossrefs

Programs

  • Haskell
    a081118 n k = a081118_tabl !! (n-1) !! (k-1)
    a081118_row n = a081118_tabl !! (n-1)
    a081118_tabl  = iterate
       (\row -> (map ((+ 1) . (* 2)) row) ++ [4 * (head row) + 1]) [1]
    a081118_list = concat a081118_tabl
    -- Reinhard Zumkeller, Feb 23 2012
  • Mathematica
    Table[2^(n+1)-2^(n-k+1)-1,{n,10},{k,n}]//Flatten (* Harvey P. Dale, Apr 09 2020 *)

Formula

T(n, k) = 2^(n+1) - 2^(n-k+1) - 1, 1<=k<=n.
a(n) = (2^A002260(n)-1)*2^A004736(n)-1; a(n)=(2^i-1)*2^j-1, where i=n-t*(t+1)/2, j=(t*t+3*t+4)/2-n, t=floor((-1+sqrt(8*n-7))/2). - Boris Putievskiy, Apr 04 2013

A227062 Numbers whose base-5 sum of digits is 5.

Original entry on oeis.org

9, 13, 17, 21, 29, 33, 37, 41, 45, 53, 57, 61, 65, 77, 81, 85, 101, 105, 129, 133, 137, 141, 145, 153, 157, 161, 165, 177, 181, 185, 201, 205, 225, 253, 257, 261, 265, 277, 281, 285, 301, 305, 325, 377, 381, 385, 401, 405, 425, 501, 505, 525, 629, 633, 637
Offset: 1

Views

Author

Tom Edgar, Sep 01 2013

Keywords

Comments

All of the entries are odd.
Subsequence of A016813. - Michel Marcus, Sep 03 2013
In general, the set of numbers with sum of base-b digits equal to b is a subset of { (b-1)*k + 1; k = 2, 3, 4, ... }. - M. F. Hasler, Dec 23 2016

Examples

			The 5-ary expansion of 9 is (1,4), which has sum of digits 5.
The 5-ary expansion of 53 is (2,0,3), which has sum of digits 5.
10 is not on the list since the 5-ary expansion of 10 is (2,0), which has sum of digits 2 not 5.
		

Crossrefs

Cf. A226636 (b = 3), A226969 (b = 4), A227080 (b = 6), A227092 (b = 7), A227095 (b = 8), A227238 (b = 9), A052224 (b = 10).

Programs

  • Mathematica
    Select[Range@ 640, Total@ IntegerDigits[#, 5] == 5 &] (* Michael De Vlieger, Dec 23 2016 *)
  • PARI
    select( is(n)=sumdigits(n,5)==5, [1..999]) \\ M. F. Hasler, Dec 23 2016
    
  • Python
    from sympy.utilities.iterables import multiset_permutations
    def auptodigs(maxdigits_base5):
        alst = []
        for d in range(2, maxdigits_base5 + 1):
            fulldigset = list("0"*(d-2) + "111112234")
            for firstdig in "1234":
                target_sum, restdigset = 5 - int(firstdig), fulldigset[:]
                restdigset.remove(firstdig)
                for p in multiset_permutations(restdigset, d-1):
                    if sum(map(int, p)) == target_sum:
                      alst.append(int(firstdig+"".join(p), 5))
                      if int(p[0]) == target_sum:
                          break
        return alst
    print(auptodigs(5)) # Michael S. Branicky, Sep 13 2021
    
  • Python
    agen = A226636gen(sod=5, base=5) # generator of terms using code in A226636
    print([next(agen) for n in range(1, 56)]) # Michael S. Branicky, Jul 10 2022
  • Sage
    [i for i in [0..1000] if sum(Integer(i).digits(base=5))==5]
    

A227080 Numbers whose base-6 sum of digits is 6.

Original entry on oeis.org

11, 16, 21, 26, 31, 41, 46, 51, 56, 61, 66, 76, 81, 86, 91, 96, 111, 116, 121, 126, 146, 151, 156, 181, 186, 221, 226, 231, 236, 241, 246, 256, 261, 266, 271, 276, 291, 296, 301, 306, 326, 331, 336, 361, 366, 396, 436, 441, 446, 451, 456, 471, 476, 481, 486
Offset: 1

Views

Author

Tom Edgar, Sep 01 2013

Keywords

Comments

Subsequence of A016861. - Michel Marcus, Sep 03 2013
In general, the set of numbers with sum of base-b digits equal to b is a subset of { (b-1)*k + 1; k = 2, 3, 4, ... }. - M. F. Hasler, Dec 23 2016

Examples

			The 6-ary expansion of 11 is (1,5), which has sum of digits 6.
The 6-ary expansion of 46 is (1,1,4), which has sum of digits 6.
9 is not on the list since the 6-ary expansion of 10 is (1,3), which has sum of digits 4 not 6.
		

Crossrefs

Cf. A226636 (b = 3), A226639 (b = 4), A227062 (b = 5), A227080 (b = 6), A227092 (b = 7), A227095 (b = 8), A227238 (b = 9), A052224 (b = 10).

Programs

  • Mathematica
    Select[Range[500],Total[IntegerDigits[#,6]]==6&] (* Harvey P. Dale, Nov 25 2016 *)
  • PARI
    select( is(n)=sumdigits(n,6)==6, [1..999]) \\ M. F. Hasler, Dec 23 2016
    
  • Python
    # see A052224 for a faster version if going to high numbers
    from sympy.ntheory import digits
    def ok(n): return sum(digits(n, 6)[1:]) == 6
    print([k for k in range(487) if ok(k)]) # Michael S. Branicky, Nov 16 2021
    
  • Python
    agen = A226636gen(sod=6, base=6) # generator of terms using code in A226636
    print([next(agen) for n in range(1, 56)]) # Michael S. Branicky, Jul 10 2022
  • Sage
    [i for i in [0..1000] if sum(Integer(i).digits(base=6))==6]
    

A239703 Number of bases b > 1 for which the base-b digital sum of n is b.

Original entry on oeis.org

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

Views

Author

Hieronymus Fischer, Mar 31 2014

Keywords

Comments

For the definition of the digital sum, see A007953.
For reference, we write digitSum_b(x) for the base-b digital sum of x according to A007953 (with general base b).
The bases counted exclude the special base 1. The base-1 expansion of a natural number is defined as 1=1_1, 2=11_1, 3=111_1 and so on. As a result, the base-1 digital sum of n is n. The inclusion of base b = 1 would lead to a(1) = 1 instead of a(1) = 0. All other terms remain unchanged.
For odd n > 1 and b := (n + 1)/2 we have digitSum_b(n) = b, and thus a(n) >= 1.
The digitSum_b(n) is < b for bases b which satisfy b > floor((n+1)/2), and thus a(n) <= floor((n+1)/2).
If b is a base such that the base-b digital sum of n is b, then b < n and b - 1 is a divisor of n - 1, thus the number of such bases is limited by the number of divisors of n - 1 (see formula section).
If p < n - 1 is a divisor of n - 1 which satisfy p >= sqrt(n - 1), then digitSum_b(n) = b for b := p + 1. This leads to a lower bound for a(n) (see formula section).
If b - 1 is a divisor of n - 1, then b is not necessarily a base such that base-b digital sum of n is b. Example: 1, 2, 3, 4, 6, 8, 12, 16, and 24 are the divisors < 48 of 48, but digitSum_2(49) = 3, digitSum_3(49) = 5, digitSum_5(49) = 9, digitSum_7(49) = 1.
a(b*n) > 0 for all b > 1 which satisfy digitSum_b(n) = b.
Example 1: digitSum_2(3) = 2, hence a(2*3) > 0.
Example 2: digitSum_3(5) = 3, hence a(3*5) > 0.
The first n with a(n) = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ... are n = 3, 5, 17, 13, 31, 57, 37, 61, 81, 85, ... .

Examples

			a(1) = 1, since digitSum_1(1) = 1 and digitSum_b(1) <> b for all b > 1.
a(2) = 0, since digitSum_1(2) = 2 (because of 2 = 11_1), and digitSum_2(2) = 1 (because of 2 = 10_2), and digitSum_b(2) = 2 for all b > 2.
a(3) = 1, since digitSum_1(3) = 3 (because of 3 = 111_1), and digitSum_2(3) = 2 (because of 3 = 11_2), and digitSum_3(3) = 1 (because of 3 = 10_3), and digitSum_b(3) = 3 for all b > 3.
a(5) = 2, since digitSum_1(5) = 5 (because of 5 = 11111_1), and digitSum_2(5) = 2 (because of 5 = 101_2), and digitSum_3(5) = 3 (because of 5 = 12_3), and digitSum_4(5) = 2 (because of 5 = 11_4), and digitSum_5(5) = 1 (because of 5 = 10_5), and digitSum_b(5) = 5 for all b > 5.
		

Crossrefs

Cf. A000040; A000005 (definition of sigma_0(n)).

Programs

  • Smalltalk
    "> Version 1: simple calculation for small numbers.
      Answer the number of bases b such that the digital sum of n in base b is b.
      Valid for bases b >= 1, thus returning a(1) = 1.
      Using digitalSum from A007953.
      Usage: n numOfBasesWithAltDigitalSumEQBase
      Answer: a(n)"
    numOfBasesWithDigitalSumEQBase
      | numBases b bmax |
      numBases := 0.
      bmax := self + 1 // 2.
      b := 0.
      [b < bmax] whileTrue: [
         b := b + 1
         (self digitalSum: b) = b
         ifTrue: [numBases := numBases + 1]].
      ^numBases
    -----------
    "> Version 2: accelerated calculation for large numbers.
      Answer the number of bases b such that the digital sum of n in base b is b.
      Valid for bases b > 1, thus returning a(1) = 0.
      Using digitalSum from A007953.
      Usage: n numOfBasesWithAltDigitalSumEQBase
      Answer: a(n)"
    numOfBasesWithDigitalSumEQBase
      | numBases div b bsize |
      self < 3 ifTrue: [^0].
      div := (self - 1) divisors.
      numBases := 0.
      bsize := div size - 1.
      1 to: bsize do: [ :i | b := (div at: i) + 1.
       (self digitalSum: b) = b
           ifTrue: [numBases := numBases + 1] ].
      ^numBases

Formula

a(n) = 0, if and only if n is a term of A187813.
a(A187813(n)) = 0.
a(A239708(n)) = 1, for n > 0.
a(A018900(n)) > 0, for n > 0.
a(A079696(n)) > 0, for n > 0.
a(A008864(n)) <= 1, for n > 0.
a(n) <= 1, if n - 1 is a prime.
a(n) <= sigma_0(n - 1) - 1, for n > 1.
a(n) >= floor((sigma_0(n-1)-1)/2), for n > 1.

A067576 Array T(i,j) read by downward antidiagonals, where T(i,j) is the j-th term whose binary expansion has i 1's.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 6, 11, 15, 16, 9, 13, 23, 31, 32, 10, 14, 27, 47, 63, 64, 12, 19, 29, 55, 95, 127, 128, 17, 21, 30, 59, 111, 191, 255, 256, 18, 22, 39, 61, 119, 223, 383, 511, 512, 20, 25, 43, 62, 123, 239, 447, 767, 1023, 1024, 24, 26, 45, 79, 125, 247, 479, 895, 1535, 2047
Offset: 1

Views

Author

Robert G. Wilson v, Jan 30 2002

Keywords

Comments

This is a permutation of the positive integers; the inverse permutation is A356419. - Jianing Song, Aug 06 2022

Examples

			Array begins:
        j=1  j=2  j=3  j=4  j=5  j=6
  i=1:    1,   2,   4,   8,  16,  32, ...
  i=2:    3,   5,   6,   9,  10,  12, ...
  i=3:    7,  11,  13,  14,  19,  21, ...
  i=4:   15,  23,  27,  29,  30,  39, ...
  i=5:   31,  47,  55,  59,  61,  62, ...
  i=6:   63,  95, 111, 119, 123, 125, ...
		

Crossrefs

T(n,n) gives A036563(n+1).
The antidiagonals are read in the opposite direction from those in A066884.
Antidiagonal sums give A361074.

Programs

  • Mathematica
    a = {}; Do[ a = Append[a, Last[ Take[ Select[ Range[2^13], Count[ IntegerDigits[ #, 2], 1] == j & ], i - j]]], {i, 2, 12}, {j, 1, i - 1} ]; a

A226969 Numbers whose base-4 sum of digits is 4.

Original entry on oeis.org

7, 10, 13, 19, 22, 25, 28, 34, 37, 40, 49, 52, 67, 70, 73, 76, 82, 85, 88, 97, 100, 112, 130, 133, 136, 145, 148, 160, 193, 196, 208, 259, 262, 265, 268, 274, 277, 280, 289, 292, 304, 322, 325, 328, 337, 340, 352, 385, 388, 400, 448, 514, 517, 520, 529, 532
Offset: 1

Views

Author

Tom Edgar, Sep 01 2013

Keywords

Comments

Subsequence of A016777. - Michel Marcus, Sep 03 2013
In general, the set of numbers with sum of base-b digits equal to b is a subset of { (b-1)*k + 1; k = 2, 3, 4, ... }. - M. F. Hasler, Dec 23 2016

Examples

			The quaternary expansion of 13 is (3,1), which has sum of digits 4.
The quaternary expansion of 40 is (2,2,0), which has sum of digits 4.
17 is not on the list since the quaternary expansion of 17 is (1,0,1), which has sum of digits 2 not 4.
		

Crossrefs

Cf. A226636 (b = 3), A227062 (b = 5), A227080 (b = 6), A227092 (b = 7), A227095 (b = 8), A227238 (b = 9), A052224 (b = 10).

Programs

  • Mathematica
    Select[Range@ 540, Total@ IntegerDigits[#, 4] == 4 &] (* Michael De Vlieger, Dec 23 2016 *)
  • PARI
    select( is(n)=sumdigits(n,4)==4, [1..999]) \\ M. F. Hasler, Dec 23 2016
    
  • Python
    agen = A226636gen(sod=4, base=4) # generator of terms using code in A226636
    print([next(agen) for n in range(1, 57)]) # Michael S. Branicky, Jul 10 2022
  • Sage
    [i for i in [0..1000] if sum(Integer(i).digits(base=4))==4]
    
Previous Showing 21-30 of 77 results. Next