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.

A290934 a(n) equals the sum of the squares of the digits of A254958(n).

Original entry on oeis.org

1, 4, 9, 16, 25, 36, 49, 64, 81, 25, 25, 100, 100, 9, 81, 81, 9, 9, 49, 36, 49, 121, 121, 49, 49, 81, 81, 36, 36, 81, 81, 81, 144, 49, 121, 49, 81, 81, 121, 121, 121, 81, 121, 81, 81, 144, 144, 121, 121, 4, 36, 36, 100, 25, 25, 36, 100, 36, 100, 25, 49, 36, 36
Offset: 1

Views

Author

Jonathan Schwartz, Aug 14 2017

Keywords

Crossrefs

Programs

  • Java
    import java.util.ArrayList;public class Seq {public static void main(String[] args) {int l = 1000;
    ArrayList squares = new ArrayList();
    for (int i = 1; i <= l; i++) {squares.add((i * i));}
    int term = 1;
    for (int n = 1; n < Integer.MAX_VALUE; n++) {
    if (!(Integer.toString(n).contains("0")))
    if (squares.contains(sum(n))){
    int k = 0;
    for(int i = 0;i1000)break;}}
    static int sum(int n) {int s = 0;String str = Integer.toString(n);for (int i = 0; i < str.length(); i++) {s += (Integer.valueOf(Character.toString(str.charAt(i)))*Integer.valueOf(Character.toString(str.charAt(i))));}return s;}}
    
  • Mathematica
    Select[Map[Total, Select[Array[IntegerDigits, 1550], FreeQ[#, 0] &]^2], IntegerQ@ Sqrt@ # &] (* Michael De Vlieger, Aug 15 2017 *)
  • PARI
    lista(nn) = {for (n=1, nn, d = digits(n); if (vecmin(d) && issquare(s=sum(k=1, #d, d[k]^2)), print1(s, ", ")););} \\ Michel Marcus, Aug 28 2017

A254959 Squares not divisible by 10 with digits d_1, d_2, ... d_k such that d_1^2 + ... + d_k^2 is a square.

Original entry on oeis.org

1, 4, 9, 676, 841, 1444, 4225, 24025, 42025, 42436, 43264, 66049, 109561, 119716, 155236, 239121, 244036, 248004, 252004, 335241, 355216, 362404, 373321, 643204, 664225, 703921, 717409, 751689, 790321, 802816, 840889, 850084, 851929, 1110916, 1263376, 1292769, 1334025, 1361889, 1366561, 1371241, 1413721, 1522756, 1718721
Offset: 1

Views

Author

Derek Orr, Feb 11 2015

Keywords

Comments

Any one of these terms can have an even number of 0's following the term. Thus, the numbers ending in 0 have been omitted.

Crossrefs

Programs

  • Mathematica
    Select[Range[1500]^2,Mod[#,10]!=0&&IntegerQ[Sqrt[Total[ IntegerDigits[ #]^2]]]&] (* Harvey P. Dale, Apr 29 2019 *)
  • PARI
    for(n=0,10^3,if(n%10,N=n^2;d=digits(N);s=0;for(i=1,#d,s+=d[i]^2);if(issquare(s),print1(N,", "))))
Showing 1-2 of 2 results.