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.

User: Joonas Pohjonen

Joonas Pohjonen's wiki page.

Joonas Pohjonen has authored 7 sequences.

A246535 Largest number with at most n distinct digits in any base b >= 2 (written in decimal).

Original entry on oeis.org

1, 43, 2462, 140081, 20338085, 2610787117
Offset: 1

Author

Joonas Pohjonen, Aug 28 2014

Keywords

Comments

a(n) is the last occurrence of n in A037968.
a(n) >= A049363(n+1) - 1 for all n. - Derek Orr, Aug 31 2014
From Derek Orr, Aug 31 2014 (Start):
At least for 1 <= n <= 5, a(n)+1 fails when written in base n^2+1. Examples:
a(1) = 1 written in base 2 is 1 (1 distinct digit). 2 written in base (2-1)^2+1 = 2 is 10. Thus 2 fails.
a(2) = 43 written in base 3 is 1121 (2 distinct digits). 44 written in base 2^2+1 = 5 is 134. Thus 44 fails.
a(3) = 2462 written in base 4 is 212132 (3 distinct digits). 2463 written in base 3^2+1 = 10 is 2463. Thus 2463 fails.
Generalizing... (Conjecture)
a(n) written in base n+1 has n distinct digits. a(n)+1 written in base n^2+1 will always have n+1 distinct digits.
Further, for 1 < n <= 5, a(n)-1 fails when written in base n^2+1.
(End)
a(1)-a(6) are confirmed for all n <= 10^11. - Hiroaki Yamanouchi, Sep 21 2014
a(6) = 2610787117 written in base 7 is 121461216151 (5 distinct digits), and 2610787118 written in base 6^2+1 = 37 is (1)(0)(24)(1)(22)(2)(0) (5 distinct digits). Therefore, Derek Orr's conjecture seems to be wrong.
a(7) >= 314941024802. - Hiroaki Yamanouchi, Sep 21 2014

Examples

			a(2) = 43 since 43 has two distinct digits in bases 2 <= b <= 5, 7 <= b <= 41 and b = 43, and one distinct digit in bases b = 6, b = 42 and b >= 44. All greater numbers have at least 3 distinct digits in some base b >= 2.
		

Crossrefs

Cf. A037968.

Extensions

a(6) from Hiroaki Yamanouchi, Sep 21 2014

A245277 Largest prime all of whose substrings in its base n representation are primes.

Original entry on oeis.org

2, 11, 67, 23, 37, 491, 47, 373, 79, 6043, 379, 2203, 647, 3389, 631, 34807, 211, 28663, 1283, 6449, 439, 266003, 577, 15649, 1811, 244471, 379, 485504623, 157, 31907, 2939, 15269, 2557, 22948529, 853, 197959, 743, 59723, 113, 96873817
Offset: 3

Author

Joonas Pohjonen, Jul 16 2014

Keywords

Comments

For detailed comments for a(10)=373, see A085823 and A213300.

Examples

			a(5) = 67 = 232_5, since all its substrings in base 5 (2, 3, 23_5 = 13, 32_5 = 17 and 232_5 = 67) are primes. There are no greater primes with this property.
		

Crossrefs

Programs

  • PARI
    See Links section.

A244042 In ternary representation of n, replace 2's with 0's.

Original entry on oeis.org

0, 1, 0, 3, 4, 3, 0, 1, 0, 9, 10, 9, 12, 13, 12, 9, 10, 9, 0, 1, 0, 3, 4, 3, 0, 1, 0, 27, 28, 27, 30, 31, 30, 27, 28, 27, 36, 37, 36, 39, 40, 39, 36, 37, 36, 27, 28, 27, 30, 31, 30, 27, 28, 27, 0, 1, 0, 3, 4, 3, 0, 1, 0, 9, 10, 9, 12, 13, 12, 9, 10, 9
Offset: 0

Author

Joonas Pohjonen, Jun 17 2014

Keywords

Examples

			16 = 121_3, replacing 2 with 0 gives 101_3 = 10, so a(16) = 10.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) local t, r, i; t, r:= n, 0;
          for i from 0 while t>0 do
            r:= r+3^i*(d-> `if`(d=2, 0, d))(irem(t, 3, 't'))
          od; r
        end:
    seq(a(n), n=0..80);  # Alois P. Heinz, Jun 17 2014
  • Mathematica
    Array[FromDigits[IntegerDigits[#, 3] /. 2 -> 0, 3] &, 72, 0] (* Michael De Vlieger, Mar 17 2018 *)
  • PARI
    a(n) = my(d=digits(n, 3)); fromdigits(apply(x->(if (x==2, 0, x)), d), 3); \\ Michel Marcus, Jun 10 2017
  • Python
    from sympy.ntheory.factor_ import digits
    def a(n):return int("".join(map(str, digits(n, 3)[1:])).replace('2', '0'), 3) # Indranil Ghosh, Jun 10 2017
    

Formula

a(n) = n - 2 * A005836(A289814(n) + 1) = A005836(A289813(n) + 1). - Andrey Zabolotskiy, Nov 11 2019

A235708 Largest base in which n is pandigital.

Original entry on oeis.org

1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 3, 2, 2, 2, 2, 2, 2, 2, 3, 2, 1, 3, 3, 3, 3, 2, 2, 3, 2, 2, 2, 3, 2, 2, 3, 3, 3, 3, 2, 2, 3, 2, 2, 2, 3, 2, 3, 3, 3, 2, 3, 2, 3, 3, 3, 3, 2, 2, 3, 2, 2, 2, 3, 2, 4, 2, 2, 4, 2, 2
Offset: 1

Author

Joonas Pohjonen, May 02 2014

Keywords

Comments

The first occurrence of k in this sequence is given by A049363(k).

Crossrefs

Cf. A049363.

Programs

  • Haskell
    import Data.List (unfoldr, nub); import Data.Tuple (swap)
    a235708 n = f n where
       f 1 = 1
       f b = if isPandigital b n then b else f (b - 1) where
             isPandigital b = (== b) . length . nub . unfoldr
               (\x -> if x == 0 then Nothing else Just $ swap $ divMod x b)
    -- Reinhard Zumkeller, May 12 2014

A239348 Numbers that are not pandigital in any base b >= 3.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 16, 17, 18, 20, 22, 23, 24, 25, 26, 27, 28, 30, 31, 36, 37, 39, 40, 41, 43, 44, 49, 50, 52, 53, 54, 56, 60, 62, 67, 68, 70, 71, 72, 74, 76, 77, 79, 80, 81, 82, 84, 85, 90, 91, 93, 94, 109, 111, 112, 117, 118, 121, 122, 124
Offset: 1

Author

Joonas Pohjonen, Mar 16 2014

Keywords

Comments

Identical to A154314 until a(51).

Examples

			11 is not in the sequence because 11 = 102_3.
		

Crossrefs

Cf. A154314.

Programs

  • Mathematica
    nop[n_] := Block[{b=3, d}, While[ Length[d = IntegerDigits[n, b]] >= b &&  Union[d] != Range[0, b-1], b++]; Length[d] < b]; Select[Range[0, 124], nop] (* Giovanni Resta, Mar 17 2014 *)
  • PARI
    isok(n) = {for (b = 3, n, d = digits(n, b); if (#vecsort(d,,8) == b, return(0));); return (1);} \\ Michel Marcus, Mar 17 2014
    
  • PARI
    is(n)=for(b=3,log(n)\lambertw(log(n))+1, if(#Set(digits(n,b))==b, return(0))); 1 \\ Charles R Greathouse IV, Mar 17 2014

Formula

a(n) >> n^1.58..., where the exponent is log(3)/log(2). - Charles R Greathouse IV, Mar 17 2014

A178905 Numbers without 3 consecutive equal digits in any base b >= 2.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 9, 10, 11, 12, 18, 19, 20, 22, 25, 36, 37, 38, 44, 45, 50, 51, 52, 74, 75, 76, 77, 89, 90, 100, 101, 102, 105, 109, 147, 150, 153, 154, 165, 166, 173, 178, 179, 180, 181, 204, 205, 210, 212, 214, 217, 293, 294, 299, 300, 301, 306, 308, 309, 329
Offset: 1

Author

Joonas Pohjonen, Jun 22 2010

Keywords

Crossrefs

Cf. A063037.

Programs

  • Mathematica
    Prepend[Cases[Range[329], n_ /; NoneTrue[Range[2, (Sqrt[4 n - 3] - 1)/2], MatchQ[IntegerDigits[n, #], {_, d_, d_, d_, _}] &]], 0] (* Vladimir Reshetnikov, Mar 20 2022 *)
  • Python
    from sympy.ntheory.digits import digits
    def three_in_a_row(s):
        return any(s[i] == s[i+1] == s[i+2] for i in range(len(s) - 2))
    def ok(n):
        if n < 7: return True
        b = 2
        d = digits(n, b)[1:]
        while len(d) >= 3:
            if three_in_a_row(d): return False
            b += 1
            d = digits(n, b)[1:]
        return True
    print([k for k in range(331) if ok(k)]) # Michael S. Branicky, Mar 27 2022

A178595 Natural numbers sorted by the sum of square roots of prime factors.

Original entry on oeis.org

1, 2, 3, 5, 7, 4, 6, 11, 9, 13, 10, 15, 14, 17, 8, 19, 21, 25, 12, 22, 23, 18, 35, 26, 33, 20, 27, 49, 39, 30, 29, 28, 34, 55, 31, 16, 45, 38, 42, 65, 51, 50, 77, 24, 37, 57, 63, 44, 75, 46, 91, 36, 70, 85, 41, 52, 66, 40, 69, 43, 95, 54, 105, 121, 98, 125, 78, 119, 99, 60, 58
Offset: 1

Author

Joonas Pohjonen, May 30 2010

Keywords

Comments

Prime factors counted with multiplicity. - Harvey P. Dale, May 20 2023

Crossrefs

Similarly defined sequences: A064364, A168521.

Programs

  • Mathematica
    SortBy[Table[{n,Total[N[Sqrt[Flatten[Table[#[[1]],#[[2]]]&/@FactorInteger[n]]]]]},{n,150}],Last][[;;,1]] (* Harvey P. Dale, May 20 2023 *)

Formula

For n >= 1, Sum_{k=1..A001222(a(n))} sqrt(A027746(a(n),k)) < Sum_{k=1..A001222(a(n+1))} sqrt(A027746(a(n+1),k)). - Peter Munn, Aug 17 2022