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.

A176764 Smallest power of 4 whose decimal expansion contains n.

Original entry on oeis.org

1024, 1, 256, 16384, 4, 256, 16, 1048576, 16384, 4096, 1024, 1099511627776, 1125899906842624, 1180591620717411303424, 262144, 288230376151711744, 16, 17179869184, 1073741824, 4194304, 72057594037927936, 262144, 4722366482869645213696
Offset: 0

Views

Author

Jonathan Vos Post, Apr 25 2010

Keywords

Comments

This is to 4 as A176763 is to 3 and as A030001 is to 2.

Examples

			a(1) = 1 because 4^0 = 1 has "1" as a substring (not a proper substring, though).
a(2) = 256 because 4^4 = 256 has "2" as a substring.
a(3) = 16384 because 4^7 = 16384 has "3" as a substring.
		

Crossrefs

Programs

  • Mathematica
    A176764[n_] := Block[{k = -1}, While[StringFreeQ[IntegerString[4^++k], IntegerString[n]]]; 4^k]; Array[A176764, 50, 0] (* Paolo Xausa, Apr 03 2024 *)

Formula

a(n) = MIN{A000302(i) such that n in decimal representation is a substring of A000302(i)}.
a(n) = 4^A062521(n). - Michel Marcus, Sep 30 2014

Extensions

Corrected and extended by Sean A. Irvine and Jon E. Schoenfield, May 05 2010
a(0) prepended by Paolo Xausa, Apr 03 2024

A186774 Smallest power of n whose decimal expansion contains n+1, or 0 if no such number exists.

Original entry on oeis.org

32, 243, 256, 625, 7776, 16807, 4096, 31381059609, 0, 121, 79496847203390844133441536, 51185893014090757, 155568095557812224, 22168378200531005859375, 17592186044416, 118587876497, 11019960576, 42052983462257059
Offset: 2

Views

Author

Jonathan Vos Post, Feb 26 2011

Keywords

Comments

More precisely: smallest power of n (with positive integer exponent) whose decimal expansion contains n+1 as a substring of consecutive decimal digits. This is A[n,n+1], the diagonal above the trivial main diagonal of the array A[k,n] = Smallest power of k whose decimal expansion contains n.
The k=2 row A[2,n] = A030001.
The k=3 row A[3,n] = A176763.
The k=4 row A[4,n] = A176764.
The k=5 row A[5,n] = A176765...
a(10^k+1) = (10^k+1)^2 for k > 0. - Chai Wah Wu, Feb 13 2017

Examples

			a(2) = 32 = A030001(3) = smallest power of 2 whose decimal expansion contains 3.
a(3) = 243 = A176763(4) = smallest power of 3 whose decimal expansion contains 4.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) local t, k;
          if type(simplify(log[10](n)), integer) then 0
        else t:= cat(n+1);
             for k from 2 while searchtext(t, cat(n^k))=0
             do od; n^k
          fi
        end:
    seq(a(n), n=2..40);  # Alois P. Heinz, Feb 26 2011
  • Python
    def A186774(n):
        if sum(int(d) for d in str(n)) == 1:
            return 0
        sn, k = str(n+1), 1
        while sn not in str(k):
            k *= n
        return k # Chai Wah Wu, Feb 13 2017
Showing 1-2 of 2 results.