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.

A058433 Numbers k such that k^2 contains only digits {0,3,9}, not ending with zero.

Original entry on oeis.org

3, 969071253
Offset: 1

Views

Author

Patrick De Geest, Nov 15 2000

Keywords

Comments

No more terms up to 10^23. - Charles R Greathouse IV, Jul 27 2009

Crossrefs

Cf. A058434 (the squares), A058429 (similar for digits {0,3,4}).

Programs

  • Mathematica
    Sqrt[#]&/@Select[FromDigits/@Tuples[{0,3,9},18],Mod[#,10]!=0&&IntegerQ[Sqrt[#]]&] (* Harvey P. Dale, May 28 2025 *)
  • PARI
    /* helper function: */
    admissibleMod(M=10^5, t=[3, 9], debug=0)={ my(p=1, v); while(M > p *= 10,
        t = concat([t, t + t[1]*v=vector(#t, i, p), t + t[2]*v]));
        debug && print("t="t); t=Set(t); v=[];
        for(k=1, M, setsearch(t, k^2 % M) && v=concat(v, k)); concat(v, M+v[1])}
    /* optional arguments: Nmax = upper search limit, N = start / lower limit,
       addMod = step/chunk size, debug: 0=silent, 1=verbose */
    A058433(Nmax=1e10, N=1, addMod=10^5, debug=1)={ my(a=[], d=1,
      addNext = admissibleMod(addMod=10^logint(addMod\/1, 10), [3, 9]),
      add = vector(addMod, i, i-1 > addNext[d] && d++; addNext[d]-i+1),
      pow10 = [10^k | k<-[0..logint((Nmax \/= 1)^2, 10)]],
      nextOK = [if(n, n*pow10) | n<-[0, 2, 1, 0, 5, 4, 3, 2, 1, 0]]); N \/= 1;
      while( Nmax >= N, my(N2 = N^2, numDigits = logint(N2, 10)+1,
                           place = nextOK[1 + d = N2 \ pow10[numDigits]]);
        if( place, N = max(sqrtint(place[numDigits] + d*pow10[numDigits]), N+1);
                   next); place = 1;
        my(Nnext = min(sqrtint((d+1)*pow10[numDigits]), Nmax));
        debug && print("checking from "N" to "Nnext": <= ",
                       1+max(0, Nnext-N)*(#addNext-1)\ addMod," candidates.");
        while( Nnext >= N += add[1 + N % addMod],
          my(dr = divrem( N2 = N^2, pow10[place = numDigits] ));
          while( place-- && !d=nextOK[1+ (dr = divrem(dr[2], pow10[place]))[1]], );
          place || break; N = sqrtint(N2 - dr[2] + d[place]) + 1;
        ); if( !place, debug && print(N "^2 = ", N^2); a=concat(a,N));
        N = Nnext*3\2+1); a} \\ M. F. Hasler, May 14 2007

A119069 Triangular numbers composed of digits {0,3,9}.

Original entry on oeis.org

3, 300, 903, 990, 3003, 33930, 39903, 339900, 930930, 39033030, 990903903, 3909003990, 3993990000, 33003300903, 39999939903, 90993993300, 3390003090090, 99990099000330, 90009933903093903, 399939399933939330, 303300903903330099003, 3309000900300303999300
Offset: 1

Views

Author

Giovanni Resta, May 10 2006

Keywords

Crossrefs

Cf. A000217, A058434, A119070. See A119033 for a table of cross-references.

Formula

a(n) = A000217(A119070(n)). - Michel Marcus, Mar 22 2023

Extensions

a(21)-a(22) from Tyler Busby, Mar 22 2023
Showing 1-2 of 2 results.