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 51-60 of 90 results. Next

A276574 The infinite trunk of least squares beanstalk with reversed subsections.

Original entry on oeis.org

0, 3, 8, 6, 15, 11, 24, 21, 18, 16, 35, 32, 30, 27, 48, 45, 43, 40, 38, 63, 59, 56, 53, 51, 80, 78, 75, 72, 70, 67, 64, 99, 96, 93, 90, 88, 85, 83, 120, 117, 115, 112, 108, 105, 102, 143, 139, 136, 134, 131, 128, 126, 123, 168, 165, 162, 160, 158, 155, 152, 149, 147, 144, 195, 192, 189, 186, 183, 179, 176, 173, 171
Offset: 0

Views

Author

Antti Karttunen, Sep 07 2016

Keywords

Examples

			This can be viewed as an irregular table, where after 0, each row has A260734(n) = 1, 2, 2, 4, 4, 5, 5, 7, ... terms:
0;
3;
8, 6;
15, 11;
24, 21, 18, 16;
35, 32, 30, 27;
48, 45, 43, 40, 38;
63, 59, 56, 53, 51;
80, 78, 75, 72, 70, 67, 64;
99, 96, 93, 90, 88, 85, 83;
120, 117, 115, 112, 108, 105, 102;
...
Each row begins with (n^2)-1 (see A005563), and each successive term is obtained by subtracting A002828(k) from the previous term k, until ((n-1)^2)-1 would be encountered, which is not listed second time (as it already occurs as the first term of the previous row), but instead, the current row is finished and the next row is started with the term ((n+1)^2)-1.
		

Crossrefs

Cf. A005563 (left edge), A277023 (right edge).
Used to construct A276573.
Cf. A277015 (tells which rows end with squares, listed in A277016).

Programs

  • Scheme
    (definec (A276574 n) (cond ((zero? n) n) ((= 1 n) 3) (else (let ((maybe_next (A255131 (A276574 (- n 1))))) (if (zero? (A010052 (+ 1 maybe_next))) maybe_next (+ -1 (A000290 (+ 2 (A000196 (+ 1 maybe_next))))))))))

Formula

a(0) = 0; a(1) = 3; for n > 1, let k = A255131(a(n-1)). If k+1 is not a square, then a(n) = k, otherwise a(n) = A000290(2+A000196(k+1)) - 1.

Extensions

Example section added and the formula rewritten to a simpler form (which is now correct) - Antti Karttunen, Oct 16 2016

A276575 After a(0)=0, the first differences of A276573.

Original entry on oeis.org

0, 3, 3, 2, 3, 4, 1, 2, 3, 3, 3, 3, 2, 3, 3, 2, 3, 2, 3, 3, 2, 3, 3, 4, 1, 3, 3, 2, 3, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 4, 3, 2, 3, 3, 3, 2, 3, 3, 2, 3, 4, 1, 3, 2, 3, 3, 3, 2, 2, 3, 3, 3, 2, 3, 3, 4, 3, 3, 3, 3, 3, 2, 3, 4, 3, 3, 3, 3, 2, 3, 3, 4, 2, 3, 4, 3, 2, 3, 3, 4, 1, 3, 2, 3, 3, 3, 2, 3, 2, 3, 3, 3, 2, 3, 3, 2, 2, 3, 3, 2, 3, 3, 3, 3, 2, 3, 3, 2, 3
Offset: 0

Views

Author

Antti Karttunen, Sep 07 2016

Keywords

Crossrefs

Formula

a(n) = A002828(A276573(n)).
a(0) = 0; for n >= 1, a(n) = A276573(n) - A276573(n-1).
Other identities.
For all n >= 1, a(A260731(A132592(n))) = a(A260733(A001541(n))) = 2. [This is implied by the fact observed in the Polster video. Of course 2's occur at other points too.]

A277023 a(n) = A276573(A260732(n)); For n >= 1, a(n) = the next larger term right after each (n^2)-1 in the infinite trunk of least squares beanstalk.

Original entry on oeis.org

0, 3, 6, 11, 16, 27, 38, 51, 64, 83, 102, 123, 144, 171, 198, 227, 256, 291, 326, 361, 400, 444, 486, 531, 576, 627, 678, 731, 786, 843, 902, 963, 1026, 1091, 1158, 1227, 1296, 1371, 1446, 1523, 1600, 1683, 1767, 1851, 1938, 2025, 2118, 2211, 2304, 2403, 2502, 2603, 2706, 2811, 2918, 3027, 3136, 3251, 3366, 3483, 3600, 3723, 3846
Offset: 0

Views

Author

Antti Karttunen, Oct 03 2016

Keywords

Crossrefs

Cf. A277015 (the positions of squares in this sequence), A277024, A277025 A277026.

Programs

Formula

a(n) = A276573(A260732(n)).

A277025 n for which A277023(4n) is square, thus A277024(4n) is zero.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 9, 10, 12, 14, 15, 17, 18, 20, 21, 23, 24, 26, 28, 30, 31, 33, 34, 35, 36, 37, 39, 40, 41, 42, 44, 45, 48, 51, 52, 54, 55, 56, 57, 58, 60, 63, 66, 68, 69, 70, 71, 72, 74, 78, 80, 81, 84, 88, 90, 91, 93, 95, 96, 98, 99, 102, 105, 107, 108, 110, 111, 112, 114, 117, 118, 120, 121, 123, 126, 129, 131
Offset: 0

Views

Author

Antti Karttunen, Oct 03 2016

Keywords

Comments

Indexing starts from zero because a(0)=0 is a special case in this sequence.

Crossrefs

Complement: A277026.

A278487 Primes p such that p+1 is in A276573, the infinite trunk of least squares beanstalk.

Original entry on oeis.org

2, 5, 7, 17, 23, 29, 31, 37, 47, 71, 79, 89, 101, 107, 127, 151, 157, 167, 191, 197, 199, 223, 239, 263, 269, 271, 293, 311, 317, 337, 359, 367, 383, 389, 421, 433, 439, 443, 449, 461, 463, 479, 487, 503, 509, 521, 541, 593, 599, 607, 619, 631, 647, 653, 677, 709, 719, 727, 751, 773, 797, 809, 823, 839, 857, 863, 881, 887, 911, 919
Offset: 1

Views

Author

Antti Karttunen, Nov 25 2016

Keywords

Comments

These seem to be substantially more common than A277888, even though odd terms are slightly more common in A276573 than the even terms. See also comments in A277487.

Crossrefs

One less than A278486.
No common terms with A277888, some common terms with A278494.
Cf. A277486 (gives the count of these primes in each range [n^2, (n+1)^2]).

Programs

Formula

a(n) = A278486(n) - 1 = A276573(A278485(n)) - 1.

A278517 a(n) = smallest k for which A260731(k) = n.

Original entry on oeis.org

0, 1, 4, 8, 9, 12, 16, 18, 20, 24, 25, 29, 32, 34, 36, 40, 43, 45, 48, 49, 52, 56, 58, 61, 64, 67, 70, 72, 74, 77, 80, 81, 84, 88, 90, 93, 96, 98, 100, 104, 106, 109, 113, 116, 120, 121, 125, 128, 130, 133, 136, 139, 142, 144, 146, 148, 152, 155, 157, 160, 162, 164, 168, 169, 172, 176, 178, 180, 184, 187, 190, 193, 196, 200
Offset: 0

Views

Author

Antti Karttunen, Nov 28 2016

Keywords

Crossrefs

Cf. A260731 (a left inverse), A278518 (first differences), A278519, A278521.
Cf. also A002828, A276573.

Formula

For all n >= 0, A260731(a(n)) = n.

A062535 Don't be greedy! Difference between number of squares needed to sum to n using the greedy algorithm and using the best such sum.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 2, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 2, 1, 0, 0, 0, 2, 0, 0, 2, 0, 1, 1, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Henry Bottomley, Jun 25 2001

Keywords

Examples

			a(32)=5-2=3 since 32 can be written greedily as 25+4+1+1+1 or efficiently as 16+16.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := (n - Floor[Sqrt[n]]^2); a053610[n_] := (m = n; c = 1; While[a = f[m]; a != 0, c++; m = a]; c); SquareCnt[n_] := If[SquaresR[1, n] > 0, 1, If[SquaresR[2, n] > 0, 2, If[SquaresR[3, n] > 0, 3, 4]]]; (* a002828 *) Table[a053610[n] - SquareCnt[n], {n, 1, 100}] (* G. C. Greubel, Apr 18 2017 *)
  • Python
    from math import isqrt
    from sympy import factorint
    def A062535(n):
        c, k, f = 0, n, factorint(n).items()
        while k:
            k -= isqrt(k)**2
            c += 1
        if not any(e&1 for p,e in f): return c-1
        if all(p&3<3 or e&1^1 for p,e in f): return c-2
        return c-3-(((m:=(~n&n-1).bit_length())&1^1)&int((n>>m)&7==7)) # Chai Wah Wu, Aug 01 2023

Formula

a(n) = A053610(n) - A002828(n).

A278489 Nonleaves in the tree defined by edge relation A255131(child) = parent, the least squares beanstalk.

Original entry on oeis.org

0, 3, 6, 8, 9, 11, 15, 16, 18, 19, 21, 24, 27, 30, 32, 35, 38, 39, 40, 41, 43, 45, 48, 50, 51, 53, 54, 56, 59, 63, 64, 66, 67, 70, 71, 72, 73, 74, 75, 78, 80, 81, 83, 85, 87, 88, 90, 91, 93, 95, 96, 99, 102, 104, 105, 107, 108, 111, 112, 114, 115, 117, 120, 123, 126, 128, 129, 130, 131, 134, 135, 136, 137, 138, 139, 143, 144
Offset: 0

Views

Author

Antti Karttunen, Nov 25 2016

Keywords

Comments

Numbers n for which there exists at least one such integer k that k - A002828(k) = n, in other words, numbers n such that either A002828(1+n) is 1 or A002828(2+n) is 2 or A002828(3+n) is 3 or A002828(4+n) is 4, as the maximum value that A002828 may obtain is 4.
Indexing starts from zero, because a(0)=0 is a special case in this sequence.

Crossrefs

Complement: A278490.
Positions of nonzeros in A278216.
Cf. A276573 (the infinite trunk of the tree, is a subsequence).
Cf. A278491 (another subsequence).

A278490 Leaves in the tree defined by edge relation A255131(child) = parent, the least squares beanstalk.

Original entry on oeis.org

1, 2, 4, 5, 7, 10, 12, 13, 14, 17, 20, 22, 23, 25, 26, 28, 29, 31, 33, 34, 36, 37, 42, 44, 46, 47, 49, 52, 55, 57, 58, 60, 61, 62, 65, 68, 69, 76, 77, 79, 82, 84, 86, 89, 92, 94, 97, 98, 100, 101, 103, 106, 109, 110, 113, 116, 118, 119, 121, 122, 124, 125, 127, 132, 133, 140, 141, 142, 145, 148, 150, 153, 154, 156, 157
Offset: 1

Views

Author

Antti Karttunen, Nov 25 2016

Keywords

Comments

Numbers n for which there are no solutions to k - A002828(k) = n for any k, in other words, numbers n such that (A002828(1+n) <> 1) and (A002828(2+n) <> 2) and (A002828(3+n) <> 3) and (A002828(4+n) <> 4), as the maximum value that A002828 may obtain is 4.

Crossrefs

Complement: A278489.
Positions of zeros in A278216.
Cf. A278494 (primes in this sequence).

A278497 a(n) = Least number with the prime signature of A276573(n).

Original entry on oeis.org

2, 6, 8, 2, 6, 16, 12, 6, 24, 8, 30, 32, 6, 6, 24, 2, 12, 48, 6, 2, 24, 2, 12, 64, 2, 30, 72, 12, 30, 48, 2, 6, 24, 60, 6, 96, 12, 30, 30, 72, 48, 6, 12, 120, 6, 60, 128, 2, 6, 24, 2, 6, 144, 12, 2, 24, 6, 6, 96, 48, 30, 120, 12, 2, 48, 2, 6, 30, 24, 192, 30, 60, 72, 6, 12, 210, 6, 216, 6, 6, 96, 2, 30, 2, 12, 240, 32, 12, 24, 2, 30, 256, 6, 12, 120, 6, 120
Offset: 1

Views

Author

Antti Karttunen, Nov 25 2016

Keywords

Crossrefs

Cf. A277014 (gives the indices of squares).
Cf. also A278232.

Programs

Formula

a(n) = A046523(A276573(n)).
For all n >= 1, a(A260733(1+n)) = A278160(n).
Previous Showing 51-60 of 90 results. Next