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

A288638 Number A(n,k) of n-digit biquanimous strings using digits {0,1,...,k}; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 4, 1, 1, 1, 4, 10, 8, 1, 1, 1, 5, 19, 33, 16, 1, 1, 1, 6, 31, 92, 106, 32, 1, 1, 1, 7, 46, 201, 421, 333, 64, 1, 1, 1, 8, 64, 376, 1206, 1830, 1030, 128, 1, 1, 1, 9, 85, 633, 2841, 6751, 7687, 3153, 256, 1
Offset: 0

Views

Author

Alois P. Heinz, Jun 12 2017

Keywords

Comments

A biquanimous string is a string whose digits can be split into two groups with equal sums.

Examples

			A(2,2) = 3: 00, 11, 22.
A(3,2) = 10: 000, 011, 022, 101, 110, 112, 121, 202, 211, 220.
A(3,3) = 19: 000, 011, 022, 033, 101, 110, 112, 121, 123, 132, 202, 211, 213, 220, 231, 303, 312, 321, 330.
A(4,1) = 8: 0000, 0011, 0101, 0110, 1001, 1010, 1100, 1111.
Square array A(n,k) begins:
  1,  1,    1,    1,     1,      1,      1,      1, ...
  1,  1,    1,    1,     1,      1,      1,      1, ...
  1,  2,    3,    4,     5,      6,      7,      8, ...
  1,  4,   10,   19,    31,     46,     64,     85, ...
  1,  8,   33,   92,   201,    376,    633,    988, ...
  1, 16,  106,  421,  1206,   2841,   5801,  10696, ...
  1, 32,  333, 1830,  6751,  19718,  48245, 104676, ...
  1, 64, 1030, 7687, 36051, 128535, 372345, 939863, ...
		

Crossrefs

Rows n=0+1,2-3 give: A000012, A000027(k+1), A005448(k+1).
Main diagonal gives A288693.

Programs

  • Maple
    b:= proc(n, k, s) option remember;
          `if`(n=0, `if`(s={}, 0, 1), add(b(n-1, k, select(y->
           y<=(n-1)*k, map(x-> [abs(x-i), x+i][], s))), i=0..k))
        end:
    A:= (n, k)-> b(n, k, {0}):
    seq(seq(A(n, d-n), n=0..d), d=0..12);
  • Mathematica
    b[n_, k_, s_] := b[n, k, s] = If[n == 0, If[s == {}, 0, 1], Sum[b[n-1, k, Select[Flatten[{Abs[#-i], #+i}& /@ s], # <= (n-1)*k&]], {i, 0, k}]];
    A[n_, k_] := b[n, k, {0}];
    Table[A[n, d-n], {d, 0, 10}, {n, 0, d}] // Flatten (* Jean-François Alcover, Jun 08 2018, from Maple *)

A065024 Number of n-digit biquanimous numbers in base 10 allowing leading zeros.

Original entry on oeis.org

1, 10, 136, 2056, 29246, 376414, 4366881, 47111408, 487875964, 4951921240, 49815780829, 499304300676, 4997363405880, 49989815235610, 499959437775564, 4999832460244272, 49999282163551040, 499996822399017380, 4999985554326500949, 49999932964605448756, 499999684083134646700, 4999998493912339729030, 49999992756990963293576, 499999964931001199898296, 4999999829289953917354596
Offset: 1

Views

Author

N. J. A. Sloane, Nov 03 2001

Keywords

Comments

A biquanimous number (A064544) is a number whose digits can be split into two groups with equal sums.

References

Crossrefs

Column k=9 of A288638.

Formula

G.f.: (2764800*x^35 -54743040*x^34 +535723776*x^33 -3484062592*x^32 +17047244288*x^31 -67056352000*x^30 +220043616032*x^29 -610136398384*x^28 +1428398369904*x^27 -2800237309450*x^26 +4555415187081*x^25 -6116515610358*x^24 +6790044899737*x^23 -6333177380214*x^22 +5196278284089*x^21 -4097957831766*x^20 +3395084470412*x^19 -2936902021347*x^18 +2431358755383*x^17 -1791957130479*x^16 +1141680065910*x^15 -626654334304*x^14 +298277671441*x^13 -124021600362*x^12 +45181016933*x^11 -14371192060*x^10 +3953830871*x^9 -928344574*x^8 +183129613*x^7 -29820446*x^6 +3925130*x^5 -406196*x^4 +31739*x^3 -1755*x^2 +61*x-1) / ((10*x-1) *(5*x-1) *(4*x-1)^2 *(3*x-1)^3 *(2*x-1)^8 *(x-1)^14). - Alois P. Heinz, Jun 12 2017
Limit_{n->oo} a(n)/10^n = 1/2. - Stefano Spezia, Sep 09 2023

A065025 Consider biquanimous numbers that exclude 0's; sequence gives number of n-digit non-biquanimous numbers - number of n-digit biquanimous numbers.

Original entry on oeis.org

9, 63, 513, 3423, 18589, 73035, 225479, 617215, 1622001, 4300263, 12128763, 37076783, 122411649, 427600575, 1550703157, 5759666431, 21738733961, 82999762711, 319722139579, 1240393764207, 4840363237201, 18979321319087, 74713018378209, 295061102101311
Offset: 1

Views

Author

N. J. A. Sloane, Nov 03 2001

Keywords

Comments

A biquanimous number (A064544) is a number whose digits can be split into two groups with equal sums.

References

Crossrefs

Formula

From Alois P. Heinz, Jun 12 2017: (Start)
G.f.: -x*(988416*x^33 +272448*x^32 -6983328*x^31 -2873424*x^30 +20931912*x^29 +11886288*x^28 -33545700*x^27 -25677164*x^26 +28467368*x^25 +29854804*x^24 -7032026*x^23 -11748538*x^22 -12593064*x^21 -17118040*x^20 +24399398*x^19 +29412358*x^18 -32880510*x^17 -15770937*x^16 +33016792*x^15 -4824040*x^14 -21307320*x^13 +10258240*x^12 +7474762*x^11 -5162898*x^10 -999324*x^9 +1008806*x^8 +39654*x^7 -89810*x^6 +3200*x^5 +992*x^4 +1248*x^3 -468*x^2 +90*x -9) / ((4*x-1) *(3*x-1)^2 *(2*x-1)^3 *(x+1)^7 *(x-1)^8).
a(n) = 9^n - 2 * A288550(n). (End)

Extensions

New offset and 4 more terms from Alois P. Heinz, Jun 11 2017

A064686 a(n) = number of n-digit base-3 biquams.

Original entry on oeis.org

0, 2, 7, 23, 73, 227, 697, 2123, 6433, 19427, 58537, 176123, 529393, 1590227, 4774777, 14332523, 43013953, 129074627, 387289417, 1161999323, 3486260113, 10459304627, 31378962457, 94138984523, 282421147873, 847271832227
Offset: 1

Views

Author

David W. Wilson, Oct 10 2001

Keywords

Comments

A biquam or biquanimous number (A064544) is a number whose digits can be split into two groups with equal sum.
This is the same as A083313 (apart from the initial term). Proof: Let sum(w) denote the sum of the digits of w. There are 2*3^(n-1) n-digit base-3 numbers: w = (w_1,w_2,...,w_n) with w_i in {0,1,2} for all i and w_1 != 0. Partition them into 4 classes: (i) sum(w) is odd, (ii) sum(w) is even, w contains no 1's and has an odd number of 2s, (iii) sum(w) is even, w contains no 1's and has an even number of 2s and (iv) sum(w) is even and w contains some 1's. Clearly, no biquams occur in cases (i) and (ii), case (iii) consists entirely of biquams and, we claim, so does case (iv). For case (iv) forces an even number, say 2k, of 1's. An even number of 2s clearly gives a biquam and an odd number 2m+1 of 2s does too because {m 2s, (k+1) 1's} and {(m+1) 2s, (k-1) 1's} is a biquam split. There are 3^(n-1) w's in case (i) and 2^(n-2) w's in case (ii) and hence 2*3^(n-1) - (3^(n-1) + 2^(n-2)) = 3^(n-1) - 2^(n-2) (A083313) biquams among n-digit base-3 numbers. - David Callan, Sep 15 2004
a(n) % 100 = 23 for n = 4*k-1, k>=1; a(n) % 100 = 27 for n = 4*k+1, k>=1. - Alex Ratushnyak, Jul 03 2012
The fraction of biquams for any base approaches 1/2 as the number of digits grows but only if you count leading zeros. Without counting leading zeros, the fraction appears to converge to (b-1)/2b where b is the base used. For base 3 this is 1/3 which fits the data in this sequence (see paper cited below for proofs and the OEIS data collated as fractions). - Timothy Varghese, Aug 08 2021

Crossrefs

Essentially the same as A083313.
Cf. A053152 (partial sums).

Programs

  • Python
    print([0]+[3**n - 2**(n-1) for n in range(1,29)])
    # Alex Ratushnyak, Jul 02 2012

Formula

a(1) = 0, a(n) = 3^(n-1)-2^(n-2) for n>=2. - Alex Ratushnyak, Jul 02 2012
a(n) = 5*a(n-1)-6*a(n-2) for n>3. G.f.: -x^2*(3*x-2) / ((2*x-1)*(3*x-1)). - Colin Barker, May 27 2013

A065023 Number of states in minimal automaton that recognizes biquanimous numbers in base n.

Original entry on oeis.org

2, 4, 10, 21, 51, 89, 203, 370, 715, 1197, 2418, 3813, 7175, 11379, 19026, 29809, 51618, 75378, 125951, 185025, 285449
Offset: 2

Views

Author

N. J. A. Sloane, Nov 03 2001

Keywords

Comments

A biquanimous number (A064544) is a number whose digits can be split into two groups with equal sums.

References

  • Jeffrey Shallit, A Second Course in Formal Languages and Automata Theory, Cambridge, 2008; see Exercise 3.55.
  • William P. Thurston, personal communication.

Crossrefs

Extensions

a(11)-a(16) from Jingzhe Tang, Mar 21 2018
a(17)-a(22) from Sean A. Irvine, Aug 08 2023

A064671 Number of n-digit base 4 biquanimous numbers (with leading 0's allowed, but not all-0 string).

Original entry on oeis.org

0, 3, 18, 91, 420, 1829, 7686, 31623, 128520, 518665, 2084874, 8361995, 33497100, 134094861, 536608782, 2146926607, 8588754960, 34357248017, 137433710610, 549744803859, 2199000186900, 8796044787733, 35184271425558, 140737278640151, 562949517213720
Offset: 1

Views

Author

John W. Layman, Oct 09 2001

Keywords

Comments

A number is biquanimous (A064544) if its digits can be split into two groups with the same sum. - David W. Wilson, SeqFan memo, Oct 08 2001.

Formula

Empirical g.f.: x^2*(3 - 12*x + 22*x^2 - 16*x^3) / ((1 - x)^2*(1 - 2*x)^2*(1 - 4*x)). [From Maksym Voznyy (voznyy(AT)mail.ru), Jul 27 2009]
Conjectures from Colin Barker, Dec 16 2017: (Start)
a(n) = (2^n-2) * (1+2^n-n) / 2.
a(n) = 10*a(n-1) - 37*a(n-2) + 64*a(n-3) - 52*a(n-4) + 16*a(n-5) for n>5.
(End)

Extensions

More terms from Christian G. Bower, Oct 12 2001

A065086 Number of n-digit biquanimous numbers in base 10 not allowing leading zeros.

Original entry on oeis.org

1, 9, 126, 1920, 27190, 347168, 3990467, 42744527, 440764556, 4464045276, 44863859589, 449488519847, 4498059105204, 44992451829730, 449969622539954, 4499873022468708, 44999449703306768, 449997540235466340, 4499988731927483569, 44999947410278947807
Offset: 1

Views

Author

David W. Wilson, Nov 07 2001

Keywords

Comments

A biquanimous number (A064544) is a number whose digits can be split into two groups with equal sums.

Examples

			a(1) = 1 since 0 is the only 1-digit biquam. a(2) = 9 because there are 9 2-digit biquams, namely 11, 22, 33, 44, 55, 66, 77, 88 and 99.
		

References

Crossrefs

A065571 Numbers whose decimal digits can be permuted to give a multiple of 11.

Original entry on oeis.org

0, 11, 22, 33, 44, 55, 66, 77, 88, 99, 101, 110, 112, 121, 123, 132, 134, 139, 143, 145, 148, 154, 156, 157, 165, 166, 167, 175, 176, 178, 184, 187, 189, 193, 198, 202, 209, 211, 213, 220, 224, 231, 235, 242, 246, 249, 253, 257, 258, 264, 267, 268, 275, 276
Offset: 0

Views

Author

Reinhard Zumkeller, Dec 02 2001

Keywords

Comments

a(k) = A064544(k) for k <= 263, a(263) = 1111. But the digits of the next biquam 1113 cannot be arranged to a multiple of 11. So we have a subset of those biquams, whose separating sets differ at most by 1 in size.

Programs

  • Mathematica
    Select[Range[0,300],AnyTrue[FromDigits/@Permutations[ IntegerDigits[ #]], Divisible[ #,11]&]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Aug 15 2016 *)
Showing 1-8 of 8 results.