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.

Showing 1-2 of 2 results.

A010409 Squares mod 48.

Original entry on oeis.org

0, 1, 4, 9, 16, 25, 33, 36
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A028761.

Programs

  • Mathematica
    Union[PowerMod[Range[48], 2, 48]] (* Alonso del Arte, Dec 24 2019 *)
  • Sage
    [quadratic_residues(48)] # Zerinvary Lajos, May 24 2009
    
  • Scala
    (1 to 48).map(n => (n * n) % 48).toSet.toSeq.sorted // Alonso del Arte, Dec 24 2019

A275740 Sums of the next n consecutive nonsquare integers.

Original entry on oeis.org

0, 2, 8, 21, 46, 83, 136, 210, 306, 426, 575, 758, 972, 1223, 1519, 1855, 2236, 2669, 3156, 3694, 4290, 4956, 5678, 6467, 7332, 8269, 9278, 10368, 11548, 12804, 14148, 15593, 17126, 18753, 20485, 22325, 24262, 26308, 28481, 30756, 33148
Offset: 0

Views

Author

Olivier Gérard, Aug 07 2016

Keywords

Comments

Row sums of nonsquare integers (A000037), seen as a regular triangle:
.
2 | 2,
8 | 3, 5,
21 | 6, 7, 8,
46 | 10, 11, 12, 13,
83 | 14, 15, 17, 18, 19,
136 | 20, 21, 22, 23, 24, 26,
210 | 27, 28, 29, 30, 31, 32, 33,
306 | 34, 35, 37, 38, 39, 40, 41, 42,
...
The equivalent for all integers are A006003 (starting from 1), A229183 (starting from 2) and A027480 (starting from 0).
There are several sequences close to nonsquares whose sum of groups of n terms starts like this sequence, notably A028761, A158276, A167759.

Crossrefs

Programs

  • Maple
    R:= 0: s:= 1:
    for n from 1 to 100 do
      if floor(sqrt(s+n)) = floor(sqrt(s)) then
        R:= R, n*s + n*(n+1)/2; s:= s+n;
      else
        R:= R, n*s + n*(n+1)/2 - floor(sqrt(s+n))^2 + s+n+1; s:= s+n+1;
      fi
    od:
    R; # Robert Israel, Oct 02 2022
  • Mathematica
    Table[Sum[
      i + Floor[1/2 + Sqrt[i]], {i, n (n - 1)/2 + 1, (n + 1) (n)/2}], {n,
      0, 40}]
    Join[{0},Module[{nn=1000,nsi,len},nsi=Select[Range[nn],!IntegerQ[Sqrt[#]]&];len=Floor[ (Sqrt[ 8*Length[nsi]+1]-1)/2];Total/@TakeList[nsi,Range[len]]]] (* Harvey P. Dale, Jan 04 2024 *)

Extensions

Definition clarified by Harvey P. Dale, Jan 04 2024
Showing 1-2 of 2 results.