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 21-30 of 90 results. Next

A277193 Number of integers k in range [n^2, ((n+1)^2)-1] for which 3 = the least number of squares that add up to k (A002828).

Original entry on oeis.org

0, 1, 1, 3, 4, 4, 6, 6, 8, 9, 9, 12, 11, 14, 15, 14, 17, 18, 19, 19, 23, 20, 24, 25, 25, 26, 29, 29, 30, 32, 32, 32, 36, 36, 37, 39, 41, 40, 42, 43, 45, 45, 47, 46, 50, 49, 50, 54, 52, 55, 56, 57, 60, 60, 63, 60, 62, 65, 68, 64, 67, 70, 72, 69, 73, 74, 75, 76, 78, 78, 80, 84, 79, 85, 84, 84, 88, 89, 90, 90, 91, 94, 94, 97, 94, 99
Offset: 0

Views

Author

Antti Karttunen, Oct 04 2016

Keywords

Crossrefs

After the initial zero, one less than A277191.

Programs

  • Scheme
    (define (A277193 n) (add (lambda (i) (* (- 1 (A010052 i)) (- 1 (A229062 i)) (- 1 (A072401 i)))) (A000290 n) (+ -1 (A000290 (+ 1 n)))))
    ;; Implements sum_{i=lowlim..uplim} intfun(i)
    (define (add intfun lowlim uplim) (let sumloop ((i lowlim) (res 0)) (cond ((> i uplim) res) (else (sumloop (1+ i) (+ res (intfun i)))))))

Formula

Sum_{i=n^2 .. ((n+1)^2)-1} (1-A010052(i))*(1-A229062(i))*(1-A072401(i)).
Other identities. For all n >= 0:
1 + A077773(n) + a(n) + A277194(n) = 2n+1.
For n >= 1, a(n) = A277191(n)-1.

A277194 Number of integers k in range [n^2, ((n+1)^2)-1] for which 4 = the least number of squares that add up to k (A002828).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 04 2016

Keywords

Crossrefs

Programs

  • Scheme
    (define (A277194 n) (add A072401 (A000290 n) (+ -1 (A000290 (+ 1 n)))))
    ;; Implements sum_{i=lowlim..uplim} intfun(i)
    (define (add intfun lowlim uplim) (let sumloop ((i lowlim) (res 0)) (cond ((> i uplim) res) (else (sumloop (1+ i) (+ res (intfun i)))))))

Formula

a(n) = Sum_{i=n^2 .. ((n+1)^2)-1} A072401(i).
Other identities.
For n >= 0, 1 + A077773(n) + A277193(n) + a(n) = 2n+1.
For n >= 1, A277192(n) = A077773(n) + a(n).

A278166 a(n) = number of integers one more than a prime encountered before reaching 0 when starting from k = ((n+1)^2)-1 and iterating map k -> k - A002828(k).

Original entry on oeis.org

1, 3, 3, 5, 7, 9, 9, 11, 12, 14, 15, 18, 19, 22, 23, 26, 29, 31, 34, 37, 42, 46, 47, 51, 54, 58, 60, 64, 68, 70, 74, 78, 82, 85, 88, 92, 95, 99, 104, 109, 114, 118, 122, 128, 134, 137, 140, 149, 153, 158, 164, 173, 177, 183, 187, 191, 199, 205, 210, 217, 222, 231, 236, 241, 248, 256, 262, 273, 278, 287, 291, 298, 307, 316, 322, 332
Offset: 1

Views

Author

Antti Karttunen, Nov 13 2016

Keywords

Examples

			For n=4, starting from k = ((4+1)^2)-1, and iterating k -> A255131(k), yields 24 -> 21 -> 18 -> 16 -> 15 -> 11 -> 8 -> 6 -> 3 before 0 is reached. Subtracting one from each gives [23, 20, 17, 15, 14, 10, 7, 5, 2], of which only 23, 17, 7, 5 and 2 are primes, thus a(4) = 5.
		

Crossrefs

Partial sums of A277486.

Programs

Formula

a(1) = A277486(1); for n > 1, a(n) = A277486(n) + a(n-1).

A278168 a(n) = number of integers one less than a prime encountered before reaching 0 when starting from k = ((n+1)^2)-1 and iterating map k -> k - A002828(k).

Original entry on oeis.org

0, 1, 1, 3, 4, 5, 5, 8, 10, 13, 15, 16, 17, 19, 20, 23, 25, 28, 29, 31, 35, 39, 40, 42, 45, 47, 49, 52, 56, 59, 62, 66, 69, 73, 76, 78, 82, 87, 92, 96, 100, 103, 107, 112, 116, 120, 123, 127, 133, 137, 143, 151, 155, 159, 162, 167, 174, 177, 184, 186, 192, 198, 202, 209, 216, 220, 225, 232, 236, 244, 250, 254, 258, 261, 267, 278, 282, 287, 292, 301
Offset: 1

Views

Author

Antti Karttunen, Nov 13 2016

Keywords

Examples

			For n=4, starting from k = ((4+1)^2)-1, and iterating k -> A255131(k), yields 24 -> 21 -> 18 -> 16 -> 15 -> 11 -> 8 -> 6 -> 3 before 0 is reached. Subtracting one from each gives [25, 22, 19, 17, 16, 12, 9, 7, 4], of which only 19, 17, and 7 are primes, thus a(4) = 3.
		

Crossrefs

Partial sums of A277488.

Programs

Formula

a(1) = A277488(1); for n > 1, a(n) = A277488(n) + a(n-1).

A262678 a(n) = n - A262690(n), where A262690(n) = largest square k <= n such that A002828(n-k) = A002828(n)-1.

Original entry on oeis.org

0, 0, 1, 2, 0, 1, 2, 3, 4, 0, 1, 2, 8, 4, 5, 6, 0, 1, 9, 10, 4, 5, 13, 14, 8, 0, 1, 2, 3, 4, 5, 6, 16, 8, 9, 10, 0, 1, 2, 3, 4, 16, 17, 18, 8, 9, 10, 11, 32, 0, 1, 2, 16, 4, 5, 6, 20, 8, 9, 10, 11, 25, 13, 14, 0, 1, 2, 18, 4, 5, 34, 22, 36, 9, 25, 26, 40, 13, 29, 30, 16, 0, 1, 2, 20, 4, 5, 6, 52, 25, 9, 10, 11, 29, 13, 14, 32, 16, 49, 18, 0
Offset: 0

Views

Author

Antti Karttunen, Oct 03 2015

Keywords

Crossrefs

Cf. also A053186.

Programs

Formula

a(n) = n - A262690(n).

A284000 a(n) = a(a(n-A002828(n))) + a(n-a(n-A002828(n))) with a(1) = a(2) = a(3) = 1, where A002828(n) = the least number of squares that add up to n.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Mar 23 2017

Keywords

Comments

Does a(n)/n converge to some value near 0.6 ? See for example: a(10) = 6, a(100) = 62, a(1000) = 604, a(10000) = 6050, a(100000) = 60414.

Crossrefs

Formula

For n <= 3 a(n) = 1, else a(n) = a(a(A255131(n))) + a(n-a(A255131(n))).

A302694 a(n) is the smallest integer k such that A002828(k*n) = 3.

Original entry on oeis.org

3, 3, 1, 3, 6, 1, 2, 3, 3, 3, 1, 1, 6, 1, 2, 3, 3, 3, 1, 6, 1, 1, 2, 1, 3, 3, 1, 2, 6, 1, 2, 3, 1, 3, 1, 3, 6, 1, 2, 3, 3, 1, 1, 1, 6, 1, 2, 1, 3, 3, 1, 6, 6, 1, 2, 1, 1, 3, 1, 2, 6, 1, 2, 3, 3, 1, 1, 3, 1, 1, 2, 3, 3, 3, 1, 1, 1, 1, 2, 6, 3, 3, 1, 1, 6, 1, 2, 1, 3, 3
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Apr 11 2018

Keywords

Comments

All terms are squarefree.

Examples

			a(2) = 3 because A002828(1*2) = 2, A002828(2*2) = 1,..., and 3 is the smallest multiplier leading to A002828(3*2) = 3.
		

Crossrefs

Programs

  • Maple
    A302694 := proc(n)
        for k from 1 do
            if A002828(k*n) = 3 then
                return k;
            end if;
        end do:
    end proc:
    seq(A302694(n),n=1..100) ; # R. J. Mathar, Apr 16 2018
  • PARI
    istwo(n:int)=my(f); if(n<3, return(n>=0); ); f=factor(n>>valuation(n, 2)); for(i=1, #f[, 1], if(bitand(f[i, 2], 1)==1&&bitand(f[i, 1], 3)==3, return(0))); 1;
    isthree(n:int)=my(tmp=valuation(n, 2)); bitand(tmp, 1)||bitand(n>>tmp, 7)!=7;
    a002828(n)=if(issquare(n), !!n, if(istwo(n), 2, 4-isthree(n))); \\ A002828
    a(n) = {my(m=1); while(a002828(m*n)!=3, m++); m; } \\ Michel Marcus, Apr 12 2018

Formula

a(n^2) = 3.
Conjecture: a(n) <= 6.

Extensions

Name corrected and more terms added by Michel Marcus, Apr 12 2018

A320002 a(0) = 1; for n > 0, a(n) = A002828(n) * a(n-A002828(n)), where A002828(n) is the least number of squares that add up to n.

Original entry on oeis.org

1, 1, 2, 3, 3, 6, 9, 12, 18, 18, 36, 54, 54, 108, 162, 216, 216, 432, 432, 648, 864, 1296, 1944, 2592, 3888, 3888, 7776, 11664, 15552, 23328, 34992, 46656, 69984, 104976, 139968, 209952, 209952, 419904, 629856, 839808, 1259712, 1679616, 2519424, 3779136, 5038848, 7558272, 11337408, 15116544, 22674816, 22674816, 45349632
Offset: 0

Views

Author

Antti Karttunen, Nov 24 2018

Keywords

Comments

Product of A002828(x) computed over all x encountered when map x -> x - A002828(x) is iterated, starting from x = n, until 0 is reached.
Sequence is monotonic because A255131 is monotonic.
All terms are 3-smooth (A003586).

Crossrefs

Programs

  • Mathematica
    Nest[Append[#1, #2 #1[[-#2]] ] & @@ {#, If[First@ # > 0, 1, Length@ First@ Split@ # + 1] &@ SquaresR[Range@ 4, Length@ #]} &, {1}, 50] (* Michael De Vlieger, Nov 25 2018, after Harvey P. Dale at A002828 *)
  • PARI
    istwo(n:int) = { my(f); if(n<3, return(n>=0); ); f=factor(n>>valuation(n, 2)); for(i=1, #f[, 1], if(bitand(f[i, 2], 1)==1&&bitand(f[i, 1], 3)==3, return(0))); 1 };
    isthree(n:int) = { my(tmp=valuation(n, 2)); bitand(tmp, 1)||bitand(n>>tmp, 7)!=7 };
    A002828(n) = if(issquare(n), !!n, if(istwo(n), 2, 4-isthree(n))); \\ From A002828
    A255131(n) = (n-A002828(n));
    A320002(n) = { my(m=1, v); while(n>0, v = A002828(n); m *= v; n -= v); (m); };
    
  • PARI
    A320002(n) = if(0==n,1,A002828(n)*A320002(n-A002828(n)));

Formula

a(0) = 1; for n > 0, a(n) = A002828(n) * a(n-A002828(n)).

A141490 Least number k having n representations as the sum of the minimal number of squares, A002828.

Original entry on oeis.org

1, 27, 28, 63, 103, 124, 135, 175, 207, 247, 255, 252, 327, 351, 412, 375, 511, 423, 543, 679, 540, 639, 687, 495, 567, 663, 759, 775, 847, 988, 783, 1111, 735, 1327, 855, 927, 1191, 999, 1308, 975, 1143, 1383, 1263, 1071, 1463, 1359, 1495, 1375, 1479
Offset: 1

Views

Author

Martin Renner, Jan 15 2011

Keywords

Comments

That is, a(n) is the least k such that A180466(k) = n.

Examples

			a(1) = 1 since 1 = 1^2;
a(2) = 27 since 27 = 1^2 + 1^2 + 5^2 = 3^2 + 3^2 + 3^2 (2 ways);
a(3) = 28 since 28 = 1^2 + 1^2 + 1^2 +5^2 = 1^2 + 3^2 + 3^2 + 3^2 = 2^2 + 2^2 + 2^2 + 4^2 (3 ways).
		

Crossrefs

Cf. A180466 (number of representations of n as a minimal number of squares, A002828(n))

Programs

  • Mathematica
    t=Table[r=PowersRepresentations[n, 4, 2]; Sort[Tally[4-Count[#, 0] & /@ r]][[1, 2]], {n, 1000}]; u=Union[t]; c=Complement[Range[Max[u]], u]; If[c == {}, mx=u[[-1]], mx=c[[1]]-1]; Flatten[Table[Position[t, n, 1, 1], {n, mx}]]

A175270 Numbers k such that the least number of squares that add up to k equals the least number of triangular numbers that add up to k. Equivalently, A002828(k) = A061336(k).

Original entry on oeis.org

0, 1, 2, 13, 14, 18, 19, 20, 29, 33, 34, 35, 36, 37, 44, 54, 58, 59, 61, 62, 65, 72, 73, 75, 77, 86, 90, 96, 97, 101, 106, 107, 118, 129, 130, 131, 134, 137, 138, 140, 146, 147, 148, 152, 155, 157, 158, 160, 161, 164, 166, 176, 179, 181, 184, 187, 193, 195, 200
Offset: 1

Views

Author

Ctibor O. Zizka, Mar 19 2010

Keywords

Crossrefs

Programs

  • PARI
    is2s(n)=my(f=factor(n>>valuation(n, 2))); for(i=1, #f~, if(bitand(f[i, 2], 1) && bitand(f[i, 1], 3)==3, return(0))); 1
    is2t(n)=my(m9=n%9,f); if(m9==5 || m9==8, return(0)); is2s(4*n+1)
    is(n)=my(o2=valuation(n, 2),f); if(n==0, return(1)); if(bitand(o2, 1)==0 && bitand(n>>o2, 7)==7, return(0)); if(issquare(n), return(ispolygonal(n,3))); if(ispolygonal(n,3), return(0)); is2t(n)==is2s(n) \\ Charles R Greathouse IV, Mar 17 2022

Extensions

Data corrected and extended by Mohammed Yaseen, Mar 17 2022
Previous Showing 21-30 of 90 results. Next