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)).

A276581 After a(0)=0, each n occurs A261224(n) times.

Original entry on oeis.org

0, 1, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 18
Offset: 0

Views

Author

Antti Karttunen, Sep 07 2016

Keywords

Comments

Auxiliary function for computing A276582 & A276583.

Crossrefs

Programs

  • Mathematica
    Table[Table[n, {-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, 0, 18}] // Flatten (* Michael De Vlieger, Sep 08 2016 *)
  • Scheme
    (define (A276581 n) (let loop ((k 0)) (if (>= (A261223 (+ 1 k)) n) k (loop (+ 1 k)))))

A260734 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 - A002828(k), where A002828(k) = the least number of squares that add up to k.

Original entry on oeis.org

1, 2, 2, 4, 4, 5, 5, 7, 7, 7, 8, 10, 9, 10, 10, 13, 13, 14, 13, 15, 15, 16, 17, 17, 19, 19, 19, 20, 20, 22, 22, 23, 24, 25, 24, 26, 27, 25, 28, 29, 29, 29, 30, 31, 33, 33, 33, 34, 35, 35, 37, 36, 39, 37, 38, 40, 42, 40, 42, 42, 43, 42, 45, 45, 45, 48, 45, 49, 50, 50, 48, 53, 50, 51, 54, 52, 53, 54, 56, 56, 56, 58, 59, 59, 60, 60, 60, 61, 62, 62, 62, 65, 66, 66, 65
Offset: 1

Views

Author

Antti Karttunen, Aug 12 2015

Keywords

Crossrefs

First differences of both A260732 and A260733.
Cf. also A261224.

Programs

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

Formula

a(n) = A260731(((n+1)^2)-1) - A260731((n^2)-1). [The definition.]
Equally, for all n >= 1:
a(n) = A260731((n+1)^2) - A260731(n^2).
a(n) = A260732(n+1) - A260732(n).
a(n) = A260733(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).

A261222 a(n) = number of steps to reach 0 when starting from k = n*n 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, 2, 4, 6, 9, 12, 15, 19, 24, 29, 35, 41, 48, 55, 62, 70, 78, 87, 97, 107, 118, 129, 141, 153, 165, 178, 191, 205, 219, 234, 249, 265, 282, 299, 317, 335, 354, 373, 392, 412, 433, 454, 475, 497, 519, 542, 565, 589, 613, 638, 664, 690, 717, 744, 772, 800, 828, 857, 887, 917, 948, 979, 1010, 1042, 1074, 1107, 1140, 1174, 1208, 1243, 1278, 1314, 1351, 1388, 1426, 1464, 1503
Offset: 0

Views

Author

Antti Karttunen, Aug 12 2015

Keywords

Crossrefs

Essentially one more than A261223.
First differences: A261224.
Cf. also A260732, A261227.

Programs

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

Formula

a(n) = A261221(n^2).
Other identities. For all n >= 1:
a(n) = 1 + A261223(n).

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.

A261229 a(n) = number of steps to reach (n^3)-1 when starting from k = ((n+1)^3)-1 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

1, 3, 6, 9, 14, 19, 25, 31, 38, 44, 54, 62, 71, 81, 91, 103, 115, 129, 142, 157, 172, 187, 203, 221, 238, 256, 274, 294, 313, 335, 357, 378, 400, 424, 449, 473, 499, 525, 552, 579, 609, 637, 666, 698, 729, 760, 792, 827, 860, 895, 929, 967, 1002, 1039, 1077, 1117, 1155, 1195, 1235, 1278, 1318, 1361, 1404, 1448, 1492, 1538, 1583, 1631, 1677, 1725
Offset: 1

Views

Author

Antti Karttunen, Aug 16 2015

Keywords

Crossrefs

First differences of both A261227 and A261228.
Cf. also A261224.

Formula

a(n) = A261226(((n+1)^3)-1) - A261226((n^3)-1). [The definition.]
Equally, for all n >= 1:
a(n) = A261226((n+1)^3) - A261226(n^3).
a(n) = A261227(n+1) - A261227(n).
a(n) = A261228(n+1) - A261228(n).

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.