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 11-20 of 51 results. Next

A295005 Numbers n such that the largest digit of n^2 is 5.

Original entry on oeis.org

5, 15, 35, 39, 45, 50, 55, 65, 71, 105, 112, 115, 145, 150, 155, 185, 188, 205, 211, 229, 235, 335, 350, 365, 368, 388, 389, 390, 450, 461, 485, 495, 500, 501, 502, 505, 550, 579, 585, 595, 635, 650, 652, 665, 671, 710, 711, 715, 718, 729, 735, 745, 1005, 1015, 1050
Offset: 1

Views

Author

M. F. Hasler, Nov 12 2017

Keywords

Examples

			39 is in this sequence because 39^2 = 1521 has 5 as largest digit.
		

Crossrefs

Cf. A295015 (the corresponding squares), A277959 .. A277961 (same for digit 2 .. 4), A295006 .. A295009 (same for digit 6 .. 9).
Cf. A000290 (the squares).

Programs

  • Mathematica
    Select[Sqrt[ #]&/@(FromDigits/@Select[Tuples[ Range[ 0,5],7],Max[#] == 5&]),IntegerQ] (* Harvey P. Dale, Sep 23 2021 *)
  • PARI
    select( is_A295005(n)=n&&vecmax(digits(n^2))==5 , [0..999]) \\ The "n&&" avoids an error message for n=0.
    
  • Python
    def aupto(limit):
      alst = []
      for k in range(1, limit+1):
        if max(str(k*k)) == "5": alst.append(k)
      return alst
    print(aupto(1050)) # Michael S. Branicky, May 15 2021

Formula

a(n) = sqrt(A295015(n)), where sqrt = A000196 or A000194 or A003059.

A295009 Numbers k such that the largest digit of k^2 is 9.

Original entry on oeis.org

3, 7, 13, 14, 17, 23, 27, 30, 31, 33, 36, 37, 43, 44, 47, 53, 54, 57, 63, 64, 67, 70, 73, 77, 83, 86, 87, 89, 93, 95, 96, 97, 98, 99, 103, 107, 113, 114, 117, 118, 123, 127, 130, 133, 134, 136, 137, 138, 139, 140, 141, 143, 147, 148, 153, 157, 158, 161, 163, 164, 167, 170, 171
Offset: 1

Views

Author

M. F. Hasler, Nov 12 2017

Keywords

Examples

			23 is in this sequence because 23^2 = 529 has 9 as largest digit.
		

Crossrefs

Cf. A295019 (the corresponding squares), A277959 .. A277961 (same for digit 2 .. 4), A295005 .. A295008 (same for digit 5 .. 8).
Cf. A000290 (the squares).

Programs

  • PARI
    select( is_A295009(n)=n&&vecmax(digits(n^2))==9 , [0..999]) \\ The "n&&" avoids an error message for n=0.

Formula

a(n) = sqrt(A295019(n)), where sqrt = A000196 or A000194 or A003059.

A017912 Powers of sqrt(2) rounded up.

Original entry on oeis.org

1, 2, 2, 3, 4, 6, 8, 12, 16, 23, 32, 46, 64, 91, 128, 182, 256, 363, 512, 725, 1024, 1449, 2048, 2897, 4096, 5793, 8192, 11586, 16384, 23171, 32768, 46341, 65536, 92682, 131072, 185364, 262144, 370728, 524288, 741456, 1048576, 1482911, 2097152, 2965821, 4194304
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

Formula

a(n) = A003059(A000079(n)). - Jason Kimberley, Oct 28 2016
a(n) = A017910(n)+1 if n is odd. a(n) = A017910(n) = 2^(n/2) if n is even. - Chai Wah Wu, Jul 26 2022

A302862 a(n) = [x^n] (1 + theta_3(x))^n/(2^n*(1 - x)), where theta_3() is the Jacobi theta function.

Original entry on oeis.org

1, 2, 4, 8, 20, 57, 160, 422, 1076, 2780, 7449, 20462, 56348, 153909, 418268, 1139703, 3126068, 8618611, 23801146, 65708424, 181391905, 501296216, 1387834518, 3848187985, 10680579812, 29660831057, 82415406493, 229156296047, 637659848888, 1775648562970, 4947475298595
Offset: 0

Views

Author

Ilya Gutkovskiy, Apr 14 2018

Keywords

Comments

a(n) = number of nonnegative solutions to (x_1)^2 + (x_2)^2 + ... + (x_n)^2 <= n.

Crossrefs

Programs

  • Mathematica
    Table[SeriesCoefficient[(1 + EllipticTheta[3, 0, x])^n/(2^n (1 - x)), {x, 0, n}], {n, 0, 30}]
    Table[SeriesCoefficient[1/(1 - x) Sum[x^k^2, {k, 0, n}]^n, {x, 0, n}], {n, 0, 30}]

A341400 Number of nonnegative solutions to (x_1)^2 + (x_2)^2 + ... + (x_5)^2 <= n.

Original entry on oeis.org

1, 6, 16, 26, 36, 57, 87, 107, 122, 157, 207, 247, 277, 322, 392, 452, 482, 537, 637, 717, 773, 863, 973, 1053, 1113, 1203, 1343, 1473, 1553, 1668, 1858, 1998, 2053, 2173, 2373, 2543, 2673, 2818, 3018, 3218, 3338, 3483, 3753, 3973, 4113, 4344, 4634, 4834, 4944, 5139, 5449
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 10 2021

Keywords

Comments

Partial sums of A038671.

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(n=0, 1, `if`(n<0 or k<1, 0,
          b(n, k-1)+add(b(n-j^2, k-1), j=1..isqrt(n))))
        end:
    a:= proc(n) option remember; b(n, 5)+`if`(n>0, a(n-1), 0) end:
    seq(a(n), n=0..50);  # Alois P. Heinz, Feb 10 2021
  • Mathematica
    nmax = 50; CoefficientList[Series[(1 + EllipticTheta[3, 0, x])^5/(32 (1 - x)), {x, 0, nmax}], x]

Formula

G.f.: (1 + theta_3(x))^5 / (32 * (1 - x)).
a(n^2) = A055404(n).

A341401 Number of nonnegative solutions to (x_1)^2 + (x_2)^2 + ... + (x_6)^2 <= n.

Original entry on oeis.org

1, 7, 22, 42, 63, 99, 160, 220, 265, 337, 457, 577, 672, 792, 978, 1178, 1319, 1469, 1739, 2039, 2255, 2507, 2882, 3242, 3513, 3819, 4269, 4769, 5159, 5555, 6181, 6841, 7246, 7666, 8401, 9181, 9763, 10363, 11188, 12108, 12828, 13434, 14394, 15534, 16359, 17211, 18477, 19677
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 10 2021

Keywords

Comments

Partial sums of A045848.

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(n=0, 1, `if`(n<0 or k<1, 0,
          b(n, k-1)+add(b(n-j^2, k-1), j=1..isqrt(n))))
        end:
    a:= proc(n) option remember; b(n, 6)+`if`(n>0, a(n-1), 0) end:
    seq(a(n), n=0..47);  # Alois P. Heinz, Feb 10 2021
  • Mathematica
    nmax = 47; CoefficientList[Series[(1 + EllipticTheta[3, 0, x])^6/(64 (1 - x)), {x, 0, nmax}], x]

Formula

G.f.: (1 + theta_3(x))^6 / (64 * (1 - x)).
a(n^2) = A055405(n).

A341402 Number of nonnegative solutions to (x_1)^2 + (x_2)^2 + ... + (x_7)^2 <= n.

Original entry on oeis.org

1, 8, 29, 64, 106, 169, 281, 422, 548, 702, 961, 1276, 1556, 1864, 2326, 2893, 3390, 3852, 4545, 5455, 6253, 7002, 8080, 9361, 10453, 11496, 12903, 14618, 16194, 17643, 19589, 22011, 24027, 25714, 28143, 31188, 33792, 36137, 39203, 42920, 46294, 49108, 52580, 57165, 61365
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 10 2021

Keywords

Comments

Partial sums of A045849.

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(n=0, 1, `if`(n<0 or k<1, 0,
          b(n, k-1)+add(b(n-j^2, k-1), j=1..isqrt(n))))
        end:
    a:= proc(n) option remember; b(n, 7)+`if`(n>0, a(n-1), 0) end:
    seq(a(n), n=0..44);  # Alois P. Heinz, Feb 10 2021
  • Mathematica
    nmax = 44; CoefficientList[Series[(1 + EllipticTheta[3, 0, x])^7/(128 (1 - x)), {x, 0, nmax}], x]

Formula

G.f.: (1 + theta_3(x))^7 / (128 * (1 - x)).
a(n^2) = A055406(n).

A038760 a(n) = n - floor(sqrt(n)) * ceiling(sqrt(n)).

Original entry on oeis.org

0, 0, 0, 1, 0, -1, 0, 1, 2, 0, -2, -1, 0, 1, 2, 3, 0, -3, -2, -1, 0, 1, 2, 3, 4, 0, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 0, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 0, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 0, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 0, -8, -7, -6, -5, -4
Offset: 0

Views

Author

Henry Bottomley, May 03 2000

Keywords

Examples

			Sqrt(31) is between 5 and 6, and 31 - 6*5 = 1, so a(31)=1.
		

Crossrefs

Cf. A053188.

Programs

  • Maple
    a:= n-> n -(x-> floor(x)*ceil(x))(sqrt(n)):
    seq(a(n), n=0..100);  # Alois P. Heinz, Jan 03 2015
  • Mathematica
    f[n_]:=n-Floor[Sqrt[n]]*Ceiling[Sqrt[n]];Table[f[n],{n,0,5!}] (* Vladimir Joseph Stephan Orlovsky, Mar 29 2010 *)
  • PARI
    a(n)=if(issquare(n),0,my(s=sqrtint(n));n-s^2-s) \\ Charles R Greathouse IV, Feb 07 2013
    
  • Python
    from math import isqrt
    def A038760(n): return m-k if (m:=n-(k:=isqrt(n))**2) else 0 # Chai Wah Wu, Jul 28 2022

Formula

a(n) = n - A000196(n)*A003059(n) = n - A038759(n).

A170949 "Conway's Converger": a reordering of the integers (see Comments for definition).

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Feb 21 2010

Keywords

Comments

The integers are written in blocks of lengths 1, 3, 5, 7, 9, ... . The first number in the block is moved to the center of the block, and then the numbers are written alternately to the left and the right. The block of length 2n-1 ends with n^2, which is not moved.
Let S = Sum_{i >= 1} s(i) be a not necessarily converging series and let T = Sum_{i >= 1} s(a(i)). Then if S converges so does T. On the other hand there are examples where T converges but S does not (for example S = 1 + 1 + 0 - 1 + 1/2 + 1/2 + 0 - 1/2 - 1/2 + 1/3 (3 times) + 0 - 1/3 (3 times) + 1/5 (5 times) + 0 - 1/5 (5 times) + ...). [Conway]
From Reinhard Zumkeller, Mar 08 2010: (Start)
a(n + 2*A003059(n)) = a(n) + 2*A003059(n) - 1;
a(A002522(n-1)) = A132411(n); a(A002061(n)) = A002522(n-1). (End)
The sum of the rows is n^3+(n+1)^3 [A005898] (1,9,35,91,189,...). - Vincenzo Librandi, Feb 22 2010

Examples

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

References

  • J. H. Conway, Personal communication, Feb 19 2010

Crossrefs

Cf. A000290 (right diagonal), A132411 (left diagonal). - Michel Marcus, Aug 02 2018

Programs

  • Haskell
    a170949 n k = a170949_tabf !! (n-1) !! (k-1)
    a170949_row n = a170949_tabf !! (n-1)
    a170949_tabf = [1] : (map fst $ iterate f ([3,2,4], 3)) where
      f (xs@(x:_), i) = ([x + i + 2] ++ (map (+ i) xs) ++ [x + i + 3], i + 2)
    a170949_list = concat a170949_tabf
    -- Reinhard Zumkeller, Jan 31 2014
  • Mathematica
    row[n_] := Join[ro = Range[n^2-1, (n-1)^2+1, -2], Reverse[ro]-1, {n^2}];
    Array[row, 9] // Flatten (* Jean-François Alcover, Aug 02 2018 *)

A214078 a(n) = (ceiling (sqrt(n)))!.

Original entry on oeis.org

1, 1, 2, 2, 2, 6, 6, 6, 6, 6, 24, 24, 24, 24, 24, 24, 24, 120, 120, 120, 120, 120, 120, 120, 120, 120, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 5040, 5040, 5040, 5040, 5040, 5040, 5040, 5040, 5040, 5040, 5040, 5040, 5040, 40320, 40320, 40320
Offset: 0

Views

Author

Mohammad K. Azarian, Dec 22 2012

Keywords

Crossrefs

Programs

  • Derive
    PROG(y := [], n := 50, LOOP(IF(n = -1, RETURN y), y := ADJOIN(CEILING(SQRT(n))!, y), n := n - 1))
    
  • Magma
    [Factorial(Ceiling (Sqrt(n))): n in [0..50]]; // Vincenzo Librandi, Feb 13 2013
    
  • Mathematica
    Table[Ceiling[Sqrt[n]]!, {n, 0, 50}] (* T. D. Noe, Dec 23 2012 *)
  • PARI
    a(n) = ceil(sqrt(n))!; \\ Altug Alkan, Jan 11 2016
    
  • Python
    from math import factorial, isqrt
    def A214078(n): return factorial(1+isqrt(n-1)) if n else 1 # Chai Wah Wu, Jul 28 2022

Formula

a(n) = A000142(A003059(n)). - Michel Marcus, Jul 28 2022
Sum_{n>=0} 1/a(n) = e + 2. - Amiram Eldar, Aug 15 2022
Previous Showing 11-20 of 51 results. Next