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

A030086 Primes p whose digits do not appear in p^2.

Original entry on oeis.org

2, 3, 7, 17, 29, 47, 53, 59, 67, 79, 157, 173, 257, 307, 313, 349, 353, 359, 409, 449, 467, 547, 557, 577, 659, 673, 677, 739, 787, 853, 929, 1447, 1607, 1747, 2029, 2087, 2113, 2237, 3257, 3359, 3467, 3533, 3559, 3767, 3779, 4253, 4337, 4787, 5333, 5557, 5659
Offset: 1

Views

Author

Patrick De Geest, Dec 11 1999

Keywords

Comments

Primes of sequence A029783. - Michel Marcus, Jan 04 2015

Examples

			2 and 2^2 = 4 have no digits in common, hence 2 is in the sequence.
		

Crossrefs

Cf. A029783 (numbers n whose digits are not present in n^2).
Cf. similar sequences listed in A253574.

Programs

  • Mathematica
    Select[Prime[Range[700]],Intersection[IntegerDigits[#],IntegerDigits[ #^2]] == {}&] (* Harvey P. Dale, Oct 02 2014 *)
  • PARI
    lista(nn) = {forprime (n=1, nn, if (#setintersect(Set(vecsort(digits(n^2))), Set(vecsort(digits(n)))) == 0, print1(n, ", ")); ); } \\ Michel Marcus, Jan 04 2015

Extensions

Offset changed from 0 to 1 from Vincenzo Librandi, Jan 04 2015

A258682 Remove from n^2 all digits of n from left to right, in decimal representation.

Original entry on oeis.org

0, 0, 4, 9, 16, 2, 3, 49, 64, 81, 0, 2, 44, 69, 96, 22, 25, 289, 324, 36, 40, 44, 484, 59, 576, 6, 76, 9, 74, 841, 90, 96, 104, 1089, 1156, 122, 129, 169, 1444, 1521, 160, 681, 176, 189, 1936, 202, 211, 2209, 230, 201, 20, 260, 704, 2809, 2916, 302, 313
Offset: 0

Views

Author

Reinhard Zumkeller, Jun 07 2015

Keywords

Comments

a(A029783(n)) = A029783(n)^2; a(A189056(n)) < A189056(n)^2;
a(A178501(n)) = 0.

Examples

			.    n   n^2 |  a(n)
. -----------+------
.   20   400 |    40
.   21   441 |    44
.   22   484 |   484
.   23   529 |    59
.   24   576 |   576
.   25   625 |     6
.   26   676 |    76  not 67, as digits of n are to be removed
.   27   729 |     9                                  from left to right
.   28   784 |    74
.   29   841 |   841
.   30   900 |    90  .
		

Crossrefs

Programs

  • Haskell
    import Data.List (delete)
    a258682 n = read ('0' : minus (show (n ^ 2)) (show n)) :: Int  where
       minus [] _  = []
       minus us [] = us
       minus (u:us) vs | elem u vs = minus us $ delete u vs
                       | otherwise = u : minus us vs
  • Mathematica
    a[n_]:=Module[{idn=IntegerDigits[n],idnn=IntegerDigits[n^2],idn1},
    idn1=DeleteCases[idn,m_/;MemberQ[Complement[idn,idnn],m]];
    Do[If[First[Position[idnn,idn1[[i]]]]!= {},idnn=Delete[idnn,First[Position[idnn,idn1[[i]]]]]],
    {i,1,Length[idn1]}];FromDigits[idnn]]//Quiet;
    a/@Range[0,56] (* Ivan N. Ianakiev, Jun 11 2015 *)

A103173 Numbers k such that the decimal digits of k are not present in k^2, k^3, or k^4.

Original entry on oeis.org

2, 3, 7, 8, 53, 77
Offset: 1

Views

Author

Labos Elemer, Feb 28 2005

Keywords

Comments

No more terms exist below 10^100. The last five digits of any larger term must be 75557, 85557, 88787, 88188, 88988 or 98988. - Hagen von Eitzen, Jun 16 2009

Examples

			For k=77, the 1st through 4th powers are {77, 5929, 456533, 35153041}.
Digits of k appear first in the 5th powers {32, 243, 16807, 32768, 418195493, 2706784157}.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[10^3],ContainsNone[IntegerDigits[#],Union[IntegerDigits[#^2],IntegerDigits[#^3],IntegerDigits[#^4]]]&] (* James C. McMahon, Jan 17 2024 *)

A110815 Least n-digit number m whose square contains only digits not appearing in m.

Original entry on oeis.org

2, 17, 144, 1447, 14144, 141494, 1414414, 14144134, 141431114, 1414411113, 14143143413, 141431113114, 1414311131114, 14143111141813, 141431113114113, 1414311344113314, 14143111141141113, 141431113114331413
Offset: 1

Views

Author

Lekraj Beedassy, Aug 17 2005

Keywords

Comments

floor(sqrt(2)*10^(n-1)) < a(n). - Robert G. Wilson v, Oct 04 2005

Crossrefs

Cf. A110816 (corresponding squares), A112321. Subsequence of A029783.

Programs

  • Mathematica
    f[n_] := Block[{k = Ceiling[10^n*(1/9 + .03032)]}, While[ Intersection[ IntegerDigits[k], IntegerDigits[k^2]] != {}, k++ ]; k]; Table[ f[n], {n, 18}] (* Robert G. Wilson v *)
  • Python
    from math import isqrt
    def a(n):
      m = isqrt(int('2'+'0'*(2*n-2)))
      while set(str(m*m)) & set(str(m)) != set(): m += 1
      return m
    print([a(n) for n in range(1, 12)]) # Michael S. Branicky, Feb 17 2021

Extensions

a(3) to a(6) corrected, a(7) to a(13) from Klaus Brockhaus, Aug 31 2005; revised Sep 09 2005
a(14)-a(18) from Robert G. Wilson v, Oct 04 2005

A387070 Remove every digit that appears in n from the decimal representation of n^2. If no digits remain, set a(n) = 0.

Original entry on oeis.org

0, 0, 4, 9, 16, 2, 3, 49, 64, 81, 0, 2, 44, 69, 96, 22, 25, 289, 324, 36, 4, 44, 484, 59, 576, 6, 7, 9, 74, 841, 9, 96, 104, 1089, 1156, 122, 129, 169, 1444, 1521, 16, 68, 176, 189, 1936, 202, 211, 2209, 230, 201, 2, 260, 704, 2809, 2916, 302, 313, 3249, 3364, 3481, 3, 372, 3844, 99, 9, 422, 435
Offset: 0

Views

Author

Ali Sada, Aug 15 2025

Keywords

Examples

			a(25) = 6 since 25^2 = 625 and once we remove the 2 and 5, we are left with 6.
a(26) = 7 since 26^2 = 676 and once we remove the 6, we are left with 7.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := FromDigits[Select[IntegerDigits[n^2], FreeQ[IntegerDigits[n], #] &]]; Array[a, 100, 0] (* Amiram Eldar, Aug 16 2025 *)
  • PARI
    a(n)={my(S=Set(digits(n))); fromdigits(select(x->!setsearch(S,x), digits(n^2)))} \\ Andrew Howroyd, Aug 15 2025
    
  • Python
    def A387070(k):
        s = set(str(k))
        t = "".join(d for d in str(k**2) if d not in s)
        return int(t) if t != "" else 0
    print([A387070(n) for n in range(67)]) # Michael S. Branicky, Aug 16 2025

Formula

a(n) = A258682(n) for n <= 19.
From David A. Corneth, Aug 16 2025: (Start)
a(A029793(k)) = 0.
a(A029783(k)) = A029783(k)^2. (End)

A059931 Numbers n such that n and n^(1/2) combined use different digits.

Original entry on oeis.org

4, 9, 16, 49, 64, 81, 289, 324, 576, 841, 2809, 2916, 3249, 3481, 5184, 6241, 7056, 43681, 67081, 321489, 651249, 729316
Offset: 1

Views

Author

Patrick De Geest, Feb 15 2001

Keywords

Comments

There are exactly 22 solutions in base 10.

Crossrefs

A247843 Consecutive exclusionary squares: Numbers n such that n^2 does not contain digits of n and (n+1)^2 does not contain digits of n+1.

Original entry on oeis.org

2, 3, 7, 8, 17, 33, 38, 53, 57, 58, 157, 187, 237, 313, 333, 557, 558, 672, 688, 738, 787, 788, 812, 813, 853, 1557, 2087, 2107, 2112, 3112, 3113, 3157, 3333, 3357, 3358, 4453, 4553, 5598, 5857, 6672, 6688, 7017, 7287, 7772, 7888, 7908, 8087, 8337, 15787, 17157, 18557, 22112, 32358
Offset: 1

Views

Author

Derek Orr, Sep 25 2014

Keywords

Crossrefs

Cf. A029783.

Programs

  • Python
    for n in range(10**5):
      s,t = str(n),str(n+1)
      s2,t2 = str(n**2),str((n+1)**2)
      c = 0
      for i in s:
        if s2.count(i):
          c += 1
          break
      for j in t:
        if t2.count(j):
          c += 1
          break
      if not c:
        print(n,end=', ')

A285211 Numbers k that share no digits with the k-th triangular number.

Original entry on oeis.org

2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 24, 26, 28, 29, 30, 31, 33, 34, 38, 39, 42, 44, 46, 47, 48, 49, 52, 58, 59, 62, 64, 66, 69, 70, 71, 77, 79, 82, 84, 86, 88, 89, 114, 115, 117, 122, 124, 129, 131, 132, 246, 252, 258, 259, 262, 266, 270, 271, 277, 282, 286
Offset: 1

Views

Author

Colin Barker, Apr 13 2017

Keywords

Crossrefs

Programs

  • Maple
    filter:= proc(n) convert(convert(n,base,10),set) intersect convert(convert(n*(n+1)/2,base,10),set) = {} end proc:
    select(filter, [$1..1000]); # Robert Israel, Apr 21 2017
  • PARI
    L=List(); for(n=1, 500, if(setintersect(vecsort(digits(n),,8), vecsort(digits(n*(n+1)/2),,8))==[], listput(L, n))); Vec(L)

A385515 Repdigit numbers whose square does not contain the repeated digit.

Original entry on oeis.org

2, 3, 4, 7, 8, 9, 22, 33, 44, 77, 88, 333, 444, 3333, 33333, 44444, 88888, 333333, 3333333, 33333333, 333333333, 3333333333, 33333333333, 333333333333, 3333333333333, 33333333333333, 333333333333333, 3333333333333333, 33333333333333333, 333333333333333333
Offset: 1

Views

Author

Gonzalo Martínez, Jul 01 2025

Keywords

Comments

For n >= 18, all terms are of the form 33...3; that is, elements of A002277.
A002277(m) is a term, for m > 0. Proof: 3 is in a(n) because 3^2 = 9. If 33...3 is composed of k 3's, with k > 1, it is satisfied that 33...3^2 = 11...1088...89; i.e., (k - 1) 1's followed by a 0, then (k - 1) 8's and a 9, so that 3 is not among the digits of its square.
Let's see that there are no other terms of the form 33...3 besides 2, 4, 7, 8, 9, 22, 44, 77, 88, 444, 44444, 88888. In this sequence there are no repdigits of the form 11...1, 55...5, 66...6, since their squares end in 1, 5 and 6 respectively. On the other hand, 9 is the only number of the form 999...9, since if it has 2 or more 9's its square starts with 9. Suppose that dd...d contains 6 or more digits. We already saw that the cases d = 1, 5, 6 and 9 are discarded. Let us analyze what happens for d = 2, 4, 7 and 8:
For d = 2, we have that 22...2^2 == 284 (mod 10^3).
For d = 4, we have that 44...4^2 == 469136 (mod 10^6).
For d = 7, we have that 77...7^2 == 729 (mod 10^3).
For d = 8, we have that 88...8^2 == 876544 (mod 10^6).
Thus, we conclude that a(n) only consists of digits 3 for n >= 18. And, in fact, a(n) consists of (n - 12) 3's.

Examples

			22 is a term since 22^2 = 484 does not contain the digit 2.
		

Crossrefs

Intersection of A010785 and A029783.

Programs

  • Mathematica
    Select[Union@ Flatten@ Table[k (10^n - 1)/9, {k, 0, 9}, {n, 18}] ,ContainsNone[IntegerDigits[#^2],IntegerDigits[#]]&] (* James C. McMahon, Jul 07 2025 *)

Formula

a(n) = A002277(n - 12), for n >= 18.
Previous Showing 11-19 of 19 results.