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.

A276582 Simple self-inverse permutation of natural numbers: after a(0)=0, list each block of A261224(n) numbers in reverse order, from A261222(n) to A261223(1+n).

Original entry on oeis.org

0, 1, 3, 2, 5, 4, 8, 7, 6, 11, 10, 9, 14, 13, 12, 18, 17, 16, 15, 23, 22, 21, 20, 19, 28, 27, 26, 25, 24, 34, 33, 32, 31, 30, 29, 40, 39, 38, 37, 36, 35, 47, 46, 45, 44, 43, 42, 41, 54, 53, 52, 51, 50, 49, 48, 61, 60, 59, 58, 57, 56, 55, 69, 68, 67, 66, 65, 64, 63, 62, 77, 76, 75, 74, 73, 72, 71, 70, 86, 85, 84, 83, 82, 81, 80, 79, 78
Offset: 0

Views

Author

Antti Karttunen, Sep 07 2016

Keywords

Comments

Maps between A276583 and A276584.

Crossrefs

Programs

Formula

a(0)=0; for n >= 1, a(n) = (A261223(1+A276581(n))- n)+A261222(A276581(n)).

A260732 a(n) = number of steps needed to reach zero when starting from k = n^2 and repeatedly applying the map that replaces k with k - {the least number of squares (A002828) that add up to k}.

Original entry on oeis.org

0, 1, 2, 4, 6, 10, 14, 19, 24, 31, 38, 45, 53, 63, 72, 82, 92, 105, 118, 132, 145, 160, 175, 191, 208, 225, 244, 263, 282, 302, 322, 344, 366, 389, 413, 438, 462, 488, 515, 540, 568, 597, 626, 655, 685, 716, 749, 782, 815, 849, 884, 919, 956, 992, 1031, 1068, 1106, 1146, 1188, 1228, 1270, 1312, 1355, 1397, 1442, 1487, 1532, 1580, 1625
Offset: 0

Views

Author

Antti Karttunen, Aug 12 2015

Keywords

Crossrefs

Partial sums of A260734.
Essentially one more than A260733.
Cf. also A261222.

Programs

  • Mathematica
    Table[Length[#] - 1 &@ NestWhileList[# - (If[First@ # > 0, 1, Length[ First@ Split@ #] + 1] &@ SquaresR[Range@ 4, #]) &, n^2, # != 0 &], {n, 0, 68}] (* Michael De Vlieger, Sep 08 2016, after Harvey P. Dale at A002828 *)

Formula

a(n) = A260731(n^2).
For all n >= 1: a(n) = 1 + A260733(n).

A260740 a(n) = n minus the number of positive squares needed to sum to n using the greedy algorithm: a(n) = n - A053610(n).

Original entry on oeis.org

0, 0, 0, 0, 3, 3, 3, 3, 6, 8, 8, 8, 8, 11, 11, 11, 15, 15, 15, 15, 18, 18, 18, 18, 21, 24, 24, 24, 24, 27, 27, 27, 27, 30, 32, 32, 35, 35, 35, 35, 38, 38, 38, 38, 41, 43, 43, 43, 43, 48, 48, 48, 48, 51, 51, 51, 51, 54, 56, 56, 56, 56, 59, 59, 63, 63, 63, 63, 66, 66, 66, 66, 69, 71, 71, 71, 71, 74, 74, 74, 78, 80
Offset: 0

Views

Author

Antti Karttunen, Aug 12 2015

Keywords

Crossrefs

Formula

a(n) = n - A053610(n).
As a recurrence:
a(0) = 0; for n >= 1, a(n) = -1 + A048760(n) + a(n-A048760(n)). [Where A048760(n) gives the largest square <= n.]
Other identities. For all n >= 1:
a(n) = A255131(n) - A062535(n).

A261088 Number of steps needed to reach zero when starting from k = n^2 and repeatedly applying the map that replaces k with k - d(k), where d(k) is the number of divisors of k (A000005).

Original entry on oeis.org

0, 1, 2, 3, 5, 6, 10, 10, 19, 15, 19, 21, 24, 28, 39, 33, 53, 44, 49, 53, 60, 61, 69, 72, 79, 82, 92, 93, 117, 108, 115, 115, 140, 121, 174, 146, 205, 155, 233, 217, 267, 192, 295, 209, 225, 222, 238, 249, 267, 270, 299, 290, 336, 313, 373, 328, 411, 347, 451, 380, 486, 400, 534, 422, 447, 441, 460, 460, 511, 479, 496, 504, 545, 529, 602, 553, 579, 577, 626, 612, 681, 632, 747, 665, 796, 695
Offset: 0

Views

Author

Antti Karttunen, Sep 23 2015

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_]:=Length[NestWhileList[#-DivisorSigma[0,#]&,n^2,#!= 0&]]-1;f/@Range[0,85] (* Ivan N. Ianakiev, Sep 25 2015 *)
  • PARI
    allocatemem((2^31)+(2^30));
    uplim = 2^25;
    v155043 = vector(uplim);
    v155043[1] = 1; v155043[2] = 1;
    for(i=3, uplim, v155043[i] = 1 + v155043[i-numdiv(i)]; if(!(i%65536),print1(i,", ")););
    A155043 = n -> if(!n,n,v155043[n]);
    A261088 = n -> A155043(n^2);
    for(n=0, 5792, write("b261088.txt", n, " ", A261088(n)));
    
  • Scheme
    (define (A261088 n) (A155043 (A000290 n)))

Formula

a(n) = A155043(A000290(n)) = A155043(n^2).

A261223 a(n) = number of steps to reach 0 when starting from k = (n*n)-1 and repeatedly applying the map that replaces k with k - A053610(k), where A053610(k) = the number of positive squares that sum to k using the greedy algorithm.

Original entry on oeis.org

0, 1, 3, 5, 8, 11, 14, 18, 23, 28, 34, 40, 47, 54, 61, 69, 77, 86, 96, 106, 117, 128, 140, 152, 164, 177, 190, 204, 218, 233, 248, 264, 281, 298, 316, 334, 353, 372, 391, 411, 432, 453, 474, 496, 518, 541, 564, 588, 612, 637, 663, 689, 716, 743, 771, 799, 827, 856, 886, 916, 947, 978, 1009, 1041, 1073, 1106, 1139, 1173, 1207, 1242, 1277, 1313, 1350, 1387, 1425, 1463, 1502, 1541
Offset: 1

Views

Author

Antti Karttunen, Aug 12 2015

Keywords

Crossrefs

One less than A261222.
Cf. also A260733, A261228.

Programs

  • Mathematica
    Table[-2 + Length@ NestWhileList[# - Block[{m = #, c = 1}, While[a = (# - Floor[Sqrt@ #]^2) &@ m; a != 0, c++; m = a]; c] &, (n + 1)^2, # != 0 &], {n, 0, 77}] (* Michael De Vlieger, Sep 08 2016, after Jud McCranie at A053610 *)

Formula

a(n) = A261221((n^2)-1).
a(n) = A261222(n)-1.

A261224 a(n) = number of steps needed to reach (n^2)-1 when starting from k = ((n+1)^2)-1 and repeatedly applying the map that replaces k with k - A053610(k), where A053610(k) = the number of positive squares that sum to k using the greedy algorithm.

Original entry on oeis.org

1, 2, 2, 3, 3, 3, 4, 5, 5, 6, 6, 7, 7, 7, 8, 8, 9, 10, 10, 11, 11, 12, 12, 12, 13, 13, 14, 14, 15, 15, 16, 17, 17, 18, 18, 19, 19, 19, 20, 21, 21, 21, 22, 22, 23, 23, 24, 24, 25, 26, 26, 27, 27, 28, 28, 28, 29, 30, 30, 31, 31, 31, 32, 32, 33, 33, 34, 34, 35, 35, 36, 37, 37, 38, 38, 39, 39, 39, 40, 41, 41, 42, 42, 42, 43, 43, 44, 44, 45, 45, 46
Offset: 1

Views

Author

Antti Karttunen, Aug 12 2015

Keywords

Crossrefs

First differences of both A261222 and A261223.
Cf. also A260734, A261229.

Programs

  • Mathematica
    Table[-1 + Length@ NestWhileList[# - Block[{m = #, c = 1}, While[a = (# - Floor[Sqrt@ #]^2) &@ m; a != 0, c++; m = a]; c] &, ((n + 1)^2) - 1, # != n^2 - 1 &], {n, 91}] (* Michael De Vlieger, Sep 08 2016, after Jud McCranie at A053610 *)

Formula

a(n) = A261221(((n+1)^2)-1) - A261221((n^2)-1). [The definition.]
Equally, for all n >= 1:
a(n) = A261221((n+1)^2) - A261221(n^2).
a(n) = A261222(n+1) - A261222(n).
a(n) = A261223(n+1) - A261223(n).

A261227 a(n) = number of steps to reach 0 when starting from k = n^3 and repeatedly applying the map that replaces k with k - A055401(k), where A055401(k) = the number of positive cubes needed to sum to k using the greedy algorithm.

Original entry on oeis.org

0, 1, 2, 5, 11, 20, 34, 53, 78, 109, 147, 191, 245, 307, 378, 459, 550, 653, 768, 897, 1039, 1196, 1368, 1555, 1758, 1979, 2217, 2473, 2747, 3041, 3354, 3689, 4046, 4424, 4824, 5248, 5697, 6170, 6669, 7194, 7746, 8325, 8934, 9571, 10237, 10935, 11664, 12424, 13216, 14043, 14903, 15798, 16727, 17694, 18696, 19735, 20812, 21929, 23084, 24279, 25514
Offset: 0

Views

Author

Antti Karttunen, Aug 16 2015

Keywords

Crossrefs

Essentially one more than A261228.
First differences: A261229.
Cf. also A261222.

Formula

a(0) = 0, a(1) = 1; for n >= 2, a(n) = A261229(n-1) + a(n-1).
a(n) = A261226(n^3).

A261221 a(n) = number of steps to reach 0 when starting from k = n and repeatedly applying the map that replaces k with k - A053610(k), where A053610(k) = the number of positive squares needed to sum to k using the greedy algorithm.

Original entry on oeis.org

0, 1, 1, 1, 2, 2, 2, 2, 3, 4, 4, 4, 4, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 17, 17, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 21, 22, 22, 22, 23, 24, 24, 24, 24, 25, 25, 25, 25, 26, 26, 26, 26, 26, 27, 27, 27, 28, 28, 28, 29
Offset: 0

Views

Author

Antti Karttunen, Aug 12 2015

Keywords

Crossrefs

Formula

a(0) = 0; for n >= 1, a(n) = 1 + a(A260740(n)).
Showing 1-8 of 8 results.