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-13 of 13 results.

A065739 Largest square <= sum of first n squares.

Original entry on oeis.org

1, 4, 9, 25, 49, 81, 121, 196, 256, 361, 484, 625, 784, 961, 1225, 1444, 1764, 2025, 2401, 2809, 3249, 3721, 4225, 4900, 5476, 6084, 6889, 7569, 8464, 9409, 10404, 11236, 12321, 13456, 14884, 16129, 17424, 18769, 20449, 21904, 23716, 25281
Offset: 1

Views

Author

Labos Elemer, Nov 15 2001

Keywords

Crossrefs

Programs

  • PARI
    a(n) = { sqrtint(n*(n+1)*(2*n+1)/6)^2 } \\ Harry J. Smith, Oct 29 2009

Formula

a(n) = A048760(A000330(n)).

A065740 Largest square <= n^n.

Original entry on oeis.org

1, 4, 25, 256, 3025, 46656, 822649, 16777216, 387420489, 10000000000, 285310881025, 8916100448256, 302875094536249, 11112006825558016, 437893889165373169, 18446744073709551616, 827240261832761854009, 39346408075296537575424, 1978419655659032909463364, 104857600000000000000000000
Offset: 1

Views

Author

Labos Elemer, Nov 15 2001

Keywords

Crossrefs

Programs

Formula

a(n) = A048760(A000312(n)).

A350493 a(n) = floor(sqrt(prime(n)))^2 mod n.

Original entry on oeis.org

0, 1, 1, 0, 4, 3, 2, 0, 7, 5, 3, 0, 10, 8, 6, 1, 15, 13, 7, 4, 1, 20, 12, 9, 6, 22, 19, 16, 13, 10, 28, 25, 22, 19, 4, 0, 33, 30, 27, 9, 5, 1, 40, 37, 16, 12, 8, 4, 29, 25, 21, 17, 13, 9, 36, 32, 28, 24, 20, 16, 12, 41, 37, 33, 29, 25, 56, 52, 48, 44, 40, 36
Offset: 1

Views

Author

Simon Strandgaard, Jan 01 2022

Keywords

Examples

			a(4) = A065730(4) mod 4 =  4 mod 4 = 0;
a(5) = A065730(5) mod 5 =  9 mod 5 = 4;
a(6) = A065730(6) mod 6 =  9 mod 6 = 3;
a(7) = A065730(7) mod 7 = 16 mod 7 = 2.
		

Crossrefs

Programs

  • Mathematica
    Table[PowerMod[Floor[Sqrt[Prime[n]]],2,n],{n,72}] (* Stefano Spezia, Jan 02 2022 *)
  • PARI
    a(n) = (sqrtint(prime(n))^2) % n;
    vector(20,n,a(n))
    
  • Python
    from sympy import prime, integer_nthroot
    def a(n): return (integer_nthroot(prime(n), 2)[0]**2)%n
    print([a(n) for n in range(1, 73)]) # Michael S. Branicky, Jan 02 2022
  • Ruby
    require 'prime'
    values = []
    Prime.first(20).each_with_index do |prime, i|
        values << ((Integer.sqrt(prime) ** 2) % (i + 1))
    end
    p values
    

Formula

a(n) = A065730(n) mod n.
Previous Showing 11-13 of 13 results.