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.

A253600 Smallest exponent k>1 such that n and n^k have some digits in common.

Original entry on oeis.org

2, 2, 5, 5, 3, 2, 2, 5, 5, 3, 2, 2, 2, 2, 2, 2, 2, 3, 3, 2, 2, 2, 4, 2, 3, 2, 2, 2, 2, 3, 2, 2, 2, 3, 3, 2, 2, 2, 3, 3, 2, 2, 2, 2, 3, 2, 2, 4, 2, 2, 2, 2, 2, 5, 3, 2, 2, 3, 3, 3, 2, 2, 3, 2, 2, 2, 2, 3, 2, 2, 2, 2, 3, 2, 2, 2, 2, 5, 2, 3, 2, 2, 2, 2, 3, 2, 2
Offset: 0

Views

Author

Michel Marcus, Jan 05 2015

Keywords

Comments

For all n, n^5-n is divisible by 10, and so n^5 == n (mod 10). Thus a(n) <= 5 for all n. - Tom Edgar, Jan 06 2015

Examples

			For n=2, 2^k has no digit in common with 2 until k reaches 5 to give 32, hence a(2)=5.
		

Crossrefs

Cf. sequences where a(n)=k: A103173 (k=5), A189056 (k=2), A253601 (k=3), A253602 (k=4).
Cf. A373203.

Programs

  • Maple
    f:= proc(n) local L,k;
     L:= convert(convert(n,base,10),set);
     for k from 2 do
       if convert(convert(n^k,base,10),set) intersect L <> {} then
         return k
       fi
     od
    end proc:
    map(f, [$0..100]); # Robert Israel, Mar 17 2020
  • Mathematica
    seq={};Do[k=1;Until[ContainsAny[IntegerDigits[n],IntegerDigits[n^k]],k++];AppendTo[seq,k] ,{n,0,86}];seq (* James C. McMahon, Jun 04 2024 *)
  • PARI
    a(n) = {sd = Set(vecsort(digits(n))); k=2; while (#setintersect(sd, Set(vecsort(digits(n^k)))) == 0, k++); k;}

A111442 Least perfect power of n containing all the distinct digits of n.

Original entry on oeis.org

1, 32, 243, 64, 25, 36, 16807, 32768, 729, 100, 121, 1728, 371293, 38416, 11390625, 1048576, 1419857, 1889568, 893871739, 3200000, 9261, 234256, 3404825447, 13824, 625, 208827064576, 729, 17210368, 24389, 24300000, 923521, 32768, 35937, 39304, 1838265625
Offset: 1

Views

Author

Amarnath Murthy, Aug 03 2005

Keywords

Examples

			a(12) = 1728 = 12^3, as 144=12^2 does not contain 2.
		

Crossrefs

Cf. A373203.

Programs

  • Mathematica
    seq={}; Do[k=1;  Until[  ContainsAll[IntegerDigits[n^k],IntegerDigits[n] ],k++  ];AppendTo[seq,n^k] ,{n,35}];seq (* James C. McMahon, Jun 01 2024 *)
  • PARI
    a(n) = my(k=2, d=Set(digits(n))); while(setintersect(Set(digits(n^k)), d) != d, k++); n^k; \\ Michel Marcus, Jun 03 2024

Formula

a(n) = n^A373203(n). - Michel Marcus, Jun 01 2024

Extensions

More terms from Harvey P. Dale, Dec 20 2006
Showing 1-2 of 2 results.