A228275
A(n,k) = Sum_{i=1..k} n^i; square array A(n,k), n>=0, k>=0, read by antidiagonals.
Original entry on oeis.org
0, 0, 0, 0, 1, 0, 0, 2, 2, 0, 0, 3, 6, 3, 0, 0, 4, 14, 12, 4, 0, 0, 5, 30, 39, 20, 5, 0, 0, 6, 62, 120, 84, 30, 6, 0, 0, 7, 126, 363, 340, 155, 42, 7, 0, 0, 8, 254, 1092, 1364, 780, 258, 56, 8, 0, 0, 9, 510, 3279, 5460, 3905, 1554, 399, 72, 9, 0
Offset: 0
Square array A(n,k) begins:
0, 0, 0, 0, 0, 0, 0, 0, ...
0, 1, 2, 3, 4, 5, 6, 7, ...
0, 2, 6, 14, 30, 62, 126, 254, ...
0, 3, 12, 39, 120, 363, 1092, 3279, ...
0, 4, 20, 84, 340, 1364, 5460, 21844, ...
0, 5, 30, 155, 780, 3905, 19530, 97655, ...
0, 6, 42, 258, 1554, 9330, 55986, 335922, ...
0, 7, 56, 399, 2800, 19607, 137256, 960799, ...
Columns k=0-10 give:
A000004,
A001477,
A002378,
A027444,
A027445,
A152031,
A228290,
A228291,
A228292,
A228293,
A228294.
Rows n=0-11 give:
A000004,
A001477,
A000918(k+1),
A029858(k+1),
A080674,
A104891,
A105281,
A104896,
A052379(k-1),
A052386,
A105279,
A105280.
-
A:= (n, k)-> `if`(n=1, k, (n/(n-1))*(n^k-1)):
seq(seq(A(n, d-n), n=0..d), d=0..12);
-
a[0, 0] = 0; a[1, k_] := k; a[n_, k_] := n*(n^k-1)/(n-1); Table[a[n-k, k], {n, 0, 12}, {k, n, 0, -1}] // Flatten (* Jean-François Alcover, Dec 16 2013 *)
A031972
a(n) = Sum_{k=1..n} n^k.
Original entry on oeis.org
0, 1, 6, 39, 340, 3905, 55986, 960799, 19173960, 435848049, 11111111110, 313842837671, 9726655034460, 328114698808273, 11966776581370170, 469172025408063615, 19676527011956855056, 878942778254232811937, 41660902667961039785742, 2088331858752553232964199
Offset: 0
-
a031972 n = sum $ take n $ iterate (* n) n
-- Reinhard Zumkeller, Nov 22 2014
-
[1] cat [(n^(n+1)-n)/(n-1): n in [2..20]]; // Vincenzo Librandi, Apr 16 2015
-
a:= n-> `if`(n<2, n, (n^(n+1)-n)/(n-1)):
seq(a(n), n=0..20); # Alois P. Heinz, Aug 15 2013
-
f[n_]:=Sum[n^k,{k,n}];Array[f,30] (* Vladimir Joseph Stephan Orlovsky, Feb 14 2011*)
A165617
a(n) is the number of positive integers k such that k is equal to the number of 1's in the digits of the base-n expansion of all positive integers <= k.
Original entry on oeis.org
2, 4, 8, 4, 21, 5, 45, 49, 83, 10, 269, 11, 202, 412, 479, 15, 1108, 15, 1545, 1219, 1343, 21, 8944, 706, 1043, 5077, 4084, 28, 27589, 27, 32160, 10423, 6689
Offset: 2
Martin J. Erickson (erickson(AT)truman.edu), Sep 22 2009
a(3)=4 since there are four values of k such that k is equal to the number of 1's in the digits of the base-3 expansion of all numbers <= k, namely, 1, 4, 5, 12.
From _Jon E. Schoenfield_, Apr 23 2023: (Start)
In the table below, an asterisk appears on each row k at which the cumulative count of 1's in the base-3 expansion of the positive integers 1..k is equal to k:
.
k #1's cume
---------- ---- ----
1 = 1_3 1 1*
2 = 2_3 0 1
3 = 10_3 1 2
4 = 11_3 2 4*
5 = 12_3 1 5*
6 = 20_3 0 5
7 = 21_3 1 6
8 = 22_3 0 6
9 = 100_3 1 7
10 = 101_3 2 9
11 = 102_3 1 10
12 = 110_3 2 12*
(End)
-
nn = 7; Table[c = q = 0; Do[c += DigitCount[i, n, 1]; If[c == i, q++], {i, (#^# - #)/(# - 1) &[n]}]; q, {n, 2, nn}] (* Michael De Vlieger, May 24 2023 *)
-
a(n) = {my(nmax = (n^n - 1)/(n - 1) - 1, s = 0, nb = 0); for (i=1, nmax, my(digs = digits(i, n)); s += sum (k=1, #digs, (digs[k] == 1)); if (s == i, nb++);); nb;} \\ Michel Marcus, Aug 20 2013; corrected Apr 23 2023
Example corrected by Martin J. Erickson (erickson(AT)truman.edu), Sep 25 2009
A365097
Smallest k > 1 such that the total number of digits "1" required to write the numbers 1..k in base n is equal to k.
Original entry on oeis.org
2, 4, 25, 181, 421, 3930, 8177, 102772, 199981, 3179142, 5971945, 143610511, 210826981, 4754446846, 8589934561, 222195898593, 396718580701, 13494919482970, 20479999999961, 764527028941797, 1168636602822613, 41826814261329722, 73040694872113105, 2855533828630999398
Offset: 2
For n=2, the first k=2 positive integers are 1 = 1_2 and 2 = 10_2, which have a total of two 1's, so a(2) = 2.
For n=3, the first k=4 positive integers, which are 1_3, 2_3, 10_3, and 11_3, have a total of four 1's, which is equal to k, so a(3) = 4.
For n=4, a total of 25 1's occur in the first k=25 positive integers (they occur in 1_4, 10_4, 11_4, 12_4, 13_4, 21_4, 31_4, 100_4, 101_4, 102_4, 103_4, 110_4, 111_4, 112_4, 113_4, 120_4, and 121_4 = 25), so a(4) = 25.
-
a[n_] := Module[{k = 1, sum = 1}, While[sum == 1 || sum != k, k++; sum += Count[IntegerDigits[k, n], 1]]; k]; Array[a, 6, 2] (* Amiram Eldar, Aug 29 2023 *)
-
from itertools import count
from sympy.ntheory.factor_ import digits
def A365097(n):
c, a, q, m = 1, 1, 0, 1
for k in count(2):
m += 1
if m == n:
m = 0
q += 1
a = digits(q,n).count(1)
elif m==1:
a += 1
elif m==2:
a -= 1
c += a
if c == k:
return k # Chai Wah Wu, Sep 28 2023
Showing 1-4 of 4 results.
Comments