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 31-40 of 51 results. Next

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

Original entry on oeis.org

1, 10, 46, 130, 265, 463, 799, 1339, 2014, 2780, 3860, 5444, 7301, 9263, 11783, 15263, 19250, 23237, 27893, 34193, 41519, 48701, 56765, 67421, 79484, 91067, 103739, 119855, 138035, 155819, 174923, 198863, 225890, 251444, 277976, 311492, 349122, 384420, 421284
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 10 2021

Keywords

Comments

Partial sums of A045851.

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, 9)+`if`(n>0, a(n-1), 0) end:
    seq(a(n), n=0..38);  # Alois P. Heinz, Feb 10 2021
  • Mathematica
    nmax = 38; CoefficientList[Series[(1 + EllipticTheta[3, 0, x])^9/(512 (1 - x)), {x, 0, nmax}], x]

Formula

G.f.: (1 + theta_3(x))^9 / (512 * (1 - x)).
a(n^2) = A055408(n).

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

Original entry on oeis.org

1, 11, 56, 176, 396, 738, 1308, 2268, 3618, 5258, 7449, 10689, 14889, 19609, 25369, 33289, 43154, 53774, 65739, 81339, 100671, 121221, 143421, 171501, 205701, 241283, 278678, 324398, 378998, 435968, 495428, 566468, 650798, 737888, 826083, 930123, 1053323
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 10 2021

Keywords

Comments

Partial sums of A045852.

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, 10)+`if`(n>0, a(n-1), 0) end:
    seq(a(n), n=0..36);  # Alois P. Heinz, Feb 10 2021
  • Mathematica
    nmax = 36; CoefficientList[Series[(1 + EllipticTheta[3, 0, x])^10/(1024 (1 - x)), {x, 0, nmax}], x]

Formula

G.f.: (1 + theta_3(x))^10 / (1024 * (1 - x)).
a(n^2) = A055409(n).

A134918 Ceiling(n^(5/3)).

Original entry on oeis.org

1, 4, 7, 11, 15, 20, 26, 32, 39, 47, 55, 63, 72, 82, 92, 102, 113, 124, 136, 148, 160, 173, 187, 200, 214, 229, 243, 259, 274, 290, 306, 323, 340, 357, 375, 393, 411, 430, 449, 468, 488, 508, 528, 549, 570, 591, 613, 634, 657
Offset: 1

Views

Author

Mohammad K. Azarian, Nov 17 2007

Keywords

Crossrefs

Programs

A135034 Positive integers n repeated 2n-1 times, with a leading a(0) = 0. Also: ceiling of square root of n.

Original entry on oeis.org

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

Views

Author

William A. Tedeschi, Feb 10 2008

Keywords

Examples

			a(1) = ceiling(sqrt(1)) = 1
a(6) = ceiling(sqrt(6)) = 3
		

Crossrefs

Cf. A005408, A003059 (restriction to positive indices), A000194 (round(sqrt(n))), A000196 (floor(sqrt(n))).
Partial sums of A010052.

Programs

Formula

a(n) = ceiling(sqrt(n)).
a(n) = A003059(n), for n >= 1. - R. J. Mathar, Jun 18 2008

Extensions

Edited and corrected by M. F. Hasler, Nov 12 2017

A174804 a(n) = n*ceiling(sqrt(n))*floor(sqrt(n)).

Original entry on oeis.org

0, 1, 4, 6, 16, 30, 36, 42, 48, 81, 120, 132, 144, 156, 168, 180, 256, 340, 360, 380, 400, 420, 440, 460, 480, 625, 780, 810, 840, 870, 900, 930, 960, 990, 1020, 1050, 1296, 1554, 1596, 1638, 1680, 1722, 1764, 1806, 1848, 1890, 1932, 1974, 2016, 2401, 2800
Offset: 0

Views

Author

Keywords

Comments

As a(n^2) = n^4, A000583 is a subsequence. - Bernard Schott, Feb 01 2023

Crossrefs

Programs

  • Mathematica
    f[n_]:=n*Floor[Sqrt[n]]*Ceiling[Sqrt[n]];Table[f[n],{n,0,5!}]
  • PARI
    a(n) = n*sqrtint(n)*ceil(sqrt(n)); \\ Michel Marcus, Feb 14 2018
    
  • Python
    from math import isqrt
    def A174804(n): return n*(n if (k:=(m:=isqrt(n))**2)==n else k+m) # Chai Wah Wu, Jul 29 2022

Formula

a(n) = n*A000196(n)*A003059(n). - Michel Marcus, Feb 14 2018

A295007 Numbers n such that the largest digit of n^2 is 7.

Original entry on oeis.org

24, 26, 42, 52, 61, 69, 74, 76, 82, 84, 85, 88, 124, 131, 132, 144, 154, 165, 166, 174, 181, 189, 194, 218, 224, 226, 234, 239, 240, 260, 265, 266, 269, 271, 274, 275, 276, 319, 326, 356, 371, 376, 384, 415, 416, 418, 419, 420, 421, 448, 455, 466, 474, 476, 520, 521, 524, 525, 526, 552
Offset: 1

Views

Author

M. F. Hasler, Nov 12 2017

Keywords

Examples

			24 is in this sequence because 24^2 = 576 has 7 as largest digit.
		

Crossrefs

Cf. A295017 (the corresponding squares), A277959 .. A277961 (same for digit 2 .. 4), A295005 .. A295009 (same for digit 5 .. 9).
Cf. A000290 (the squares).

Programs

  • Maple
    filter:= proc(n) max(convert(n^2,base,10))=7 end proc:
    select(filter, [$1..1000]); # Robert Israel, Feb 19 2019
  • PARI
    select( is_A295007(n)=n&&vecmax(digits(n^2))==7 , [0..999]) \\ The "n&&" avoids an error message for n=0.

Formula

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

A320471 a(n) = floor(sqrt(n)) mod ceiling(sqrt(n)).

Original entry on oeis.org

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

Views

Author

Kritsada Moomuang, Oct 13 2018

Keywords

Comments

Sequence consists of zeros interleaved with the positive integers, each positive integer k appearing 2k times.

Crossrefs

Programs

  • Magma
    [Binomial(Ceiling(Sqrt(n)), Floor(Sqrt(n))) - 1: n in [1..100]]; // Vincenzo Librandi, Dec 02 2018
    
  • Maple
    a:= proc(n) modp(floor(sqrt(n)),ceil(sqrt(n))) end: seq(a(n),n=1..100); # Muniru A Asiru, Oct 17 2018
  • Mathematica
    Array[Mod[Floor@ #, Ceiling@ #] &@ Sqrt@ # &, 99] (* or *)
    Array[IntegerPart@ # - If[IntegerQ@ #, #, 0] &@ Sqrt@ # &, 99] (* or *)
    Flatten@ Array[{0}~Join~ConstantArray[#, 2 #] &, 9] (* Michael De Vlieger, Oct 15 2018 *)
  • PARI
    a(n) = sqrtint(n) % (1+sqrtint(n-1)); \\ Michel Marcus, Nov 04 2018
    
  • PARI
    a(n) = sqrtint(n-1) * !issquare(n) \\ David A. Corneth, Nov 04 2018
    
  • Python
    from math import isqrt
    def A320471(n): return 0 if (m:=isqrt(n))**2==n else m # Chai Wah Wu, Jul 29 2022

Formula

a(n) = A000196(n) - A037213(n).
a(n) = A000196(n)*A049240(n).
a(n) = A000196(n) mod A003059(n).
a(n) = (n - A173517(n)) - A037213(n)^2.
a(n) = binomial(ceiling(sqrt(n)),floor(sqrt(n))) - 1.
From David A. Corneth, Nov 04 2018: (Start)
a(k^2) = 0.
a(m) = floor(sqrt(m)) for nonsquare m. (End)

Extensions

Corrected by Michel Marcus, Jun 14 2022

A327672 a(n) = Sum_{k=0..n} ceiling(sqrt(k)).

Original entry on oeis.org

0, 1, 3, 5, 7, 10, 13, 16, 19, 22, 26, 30, 34, 38, 42, 46, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 101, 107, 113, 119, 125, 131, 137, 143, 149, 155, 161, 168, 175, 182, 189, 196, 203, 210, 217, 224, 231, 238, 245, 252, 260, 268, 276, 284, 292, 300, 308, 316
Offset: 0

Views

Author

Peter Kagey, Sep 21 2019

Keywords

Comments

Partial sums of A003059.
Given a digraph whose vertices are numbered from 0 to n and in which an edge (u,v) exists iff u < v, a(n) is the maximum number of arcs that can be chosen so that for each vertex j other than 0 and n, the number of chosen arcs whose tail is vertex j equals the number of chosen arcs whose head is vertex j. - Xutong Ding, Dec 12 2023

Crossrefs

Programs

  • Mathematica
    Accumulate[Ceiling[Sqrt[Range[0, 60]]]]
    Table[(1 + Floor[Sqrt[n]])*(6*n - Floor[Sqrt[n]] - 2*Floor[Sqrt[n]]^2)/6, {n, 0, 100}] (* Vaclav Kotesovec, Dec 26 2023 *)

Formula

a(n) = (1 + floor(sqrt(n)))*(6*n - floor(sqrt(n)) - 2*floor(sqrt(n))^2)/6. - Vaclav Kotesovec, Dec 26 2023

A336302 a(n) = n^2 mod ceiling(sqrt(n)).

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 4, 4, 1, 0, 1, 4, 4, 1, 0, 4, 3, 4, 1, 0, 1, 4, 3, 4, 1, 0, 4, 2, 2, 4, 1, 0, 1, 4, 2, 2, 4, 1, 0, 4, 1, 0, 1, 4, 1, 0, 1, 4, 1, 0, 1, 4, 1, 0, 4, 0, 7, 7, 0, 4, 1, 0, 1, 4, 0, 7, 7, 0, 4, 1, 0, 4, 9, 6, 5, 6, 9, 4, 1, 0, 1, 4, 9, 6, 5, 6, 9, 4, 1, 0, 4, 9, 5, 3, 3, 5, 9, 4
Offset: 1

Views

Author

William Phoenix Marcum, Oct 05 2020

Keywords

Comments

A pattern emerges for certain values where ceiling(sqrt(n)) is the same.

Crossrefs

Programs

  • Mathematica
    Table[Mod[n^2, Ceiling @ Sqrt[n]], {n, 100}] (* Amiram Eldar, Oct 05 2020 *)
  • PARI
    a(n) = lift(Mod(n, ceil(sqrt(n)))^2); \\ Michel Marcus, Oct 05 2020

Formula

a(n) = A000290(n) mod A003059(n). - Michel Marcus, Oct 05 2020
a(n^2) = 0. - Michel Marcus, Oct 07 2020

A373461 a(n) = s - t where s = ceiling(sqrt(n*i)), t = sqrt(m), and m = s^2 mod n, for the smallest positive integer i for which m is square.

Original entry on oeis.org

1, 2, 1, 2, 1, 2, 3, 2, 3, 4, 5, 2, 7, 8, 3, 4, 9, 6, 11, 4, 3, 14, 15, 4, 5, 16, 3, 6, 19, 6, 21, 4, 9, 24, 5, 6, 25, 26, 9, 4, 29, 6, 31, 12, 5, 34, 35, 6, 7, 10, 9, 14, 39, 12, 5, 8, 9, 44, 45, 6, 47, 48, 7, 8, 5, 12, 51, 20
Offset: 1

Views

Author

DarĂ­o Clavijo, Jun 06 2024

Keywords

Comments

This is "s - t" in Hart's factoring algorithm.
The quantities found have s^2 - t^2 = (s-t)*(s+t) = n*i when n >= 3 and Hart notes that g = gcd(s-t, n) is a nontrivial factor of n (when n is composite).

Examples

			For n=9, i=1, s=ceiling(sqrt(9*1))=3 and m=0 then s-floor(sqrt(m))=3-0=3, so a(9)=3.
Also gcd(9, 3) gives a divisor of 3.
		

References

  • S. S. Wagstaff, Jr., The Joy of Factoring, AMS, 2013, pages 119-120.

Crossrefs

Programs

  • PARI
    a(n) = my(i=1,s,t); while(!issquare((s=sqrtint((n*i)-1)+1)^2 % n, &t), i++); s-t;
  • Python
    from sympy.ntheory.primetest import is_square
    from sympy.core.power import isqrt
    A003059 = lambda n: isqrt((n)-1)+1
    def a(n):
      i = 1
      while True:
        s = A003059(n*i)
        if is_square(m:=pow(s,2,n)):
          return s-isqrt(m)
        i+=1
    print([a(n) for n in range(1, 69)])
    
Previous Showing 31-40 of 51 results. Next