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.

A046272 Largest prime substring in 6^n (0 if none).

Original entry on oeis.org

0, 0, 3, 2, 29, 7, 5, 7993, 67961, 769, 604661, 2797, 78233, 1306069, 783641, 7018498457, 2821109, 692665944473, 66841, 609359, 4400629, 21936950640377, 16217038422671, 3022305360281, 73838133832161689, 992970137, 170581728179
Offset: 0

Views

Author

Patrick De Geest, Jun 15 1998

Keywords

Crossrefs

Cf. A046264.

Programs

  • Mathematica
    Join[{0,0},Table[SelectFirst[Reverse[Union[FromDigits/@Flatten[Table[ Partition[ IntegerDigits[ 6^k],n,1],{n,IntegerLength[6^k]-1}],1]]],PrimeQ],{k,2,28}]] (* Harvey P. Dale, Mar 08 2023 *)

A050727 Numbers k such that the decimal expansion of 6^k contains no pair of consecutive equal digits (probably finite).

Original entry on oeis.org

0, 1, 2, 3, 4, 8, 11, 13, 14, 15, 26
Offset: 1

Views

Author

Patrick De Geest, Sep 15 1999

Keywords

Comments

No additional terms up to 25000. - Harvey P. Dale, Oct 17 2011
No additional terms up to 100000. - Michel Marcus, Oct 16 2019
No additional terms up to 10^7. - Lucas A. Brown, Mar 02 2024

Examples

			6^26 = 170581728179578208256 where no consecutive digits are equal.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[120],!MemberQ[Differences[IntegerDigits[6^#]],0]&] (* Harvey P. Dale, Oct 17 2011 *)
  • PARI
    isok(n) = {my(d = digits(6^n), c = d[1]); for (i=2, #d, if (d[i] == c, return (0)); c = d[i];); return (1);} \\ Michel Marcus, Oct 16 2019
    
  • Python
    try: from gmpy2 import mpz; x = mpz(1)
    except: x = 1
    print(0)
    k = 1
    while True:
        print('\b'*42 + str(k), end='')
        x *= 6  # x == 6**k
        y, flag = x, True
        y, a = divmod(y, 10)
        while y > 6:
            b = a
            y, a = divmod(y, 10)
            if a == b:
                flag = False
                break
        if flag: print()
        k += 1
    # Lucas A. Brown, Mar 02 2024
Showing 1-2 of 2 results.