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.

A068793 a(n) = Sum_{i=1..n} i*(n^(n-i-1) + n^(n+i-1)).

Original entry on oeis.org

5, 194, 14619, 1831444, 348288905, 94197694758, 34466324363639, 16416600747716168, 9876543210123456789, 7326247444821284733610, 6569987372181208872192659, 7007407167541356868004228892
Offset: 2

Views

Author

Reinhard Zumkeller, Mar 04 2002

Keywords

Comments

a(n) = A062813(n)*n^(n-1) + A023811(n).
a(n) is a palindrome in base-n representation for all n.

Examples

			a(2) = 5 = 101_2;
a(8) = 34466324363639 = 765432101234567_8;
a(10) = 9876543210123456789;
a(16) = 21173125052858393282329502187520773615 = FEDC...876543210123456789ABCDEF_16.
		

Crossrefs

Programs

  • Python
    def A068793(n): return ((m:=n**n)*(m*(n-2)+2)-n**2+n-1)//(n-1)**2 # Chai Wah Wu, Mar 18 2024

Formula

a(n) = (n^n*(n^n*(n-2)+2)-n^2+n-1)/(n-1)^2.

A364089 a(n) is the greatest k such that the base-n digits of 2^k are all distinct.

Original entry on oeis.org

1, 1, 3, 4, 5, 8, 5, 10, 29, 19, 19, 19, 16, 18, 7, 43, 41, 37, 45, 39, 55, 33, 43, 60, 35, 61, 56, 50, 44, 69, 9, 64, 44, 80, 43, 88, 53, 71, 56, 68, 59, 78, 76, 74, 95, 109, 111, 81, 86, 136, 117, 75, 98, 83, 84, 99, 104, 116, 95, 118, 60, 81, 11, 119, 119, 172, 140, 97, 105, 113, 93, 122, 92
Offset: 2

Views

Author

Robert Israel, Jul 04 2023

Keywords

Comments

a(n) <= log_2(A062813(n)).

Examples

			a(10) = 29 because all decimal digits of 2^29 = 536870912 are distinct.
		

Crossrefs

Programs

  • Maple
    f:= proc(b) local M,k,L;
      M:= b^b - (b^b-b)/(b-1)^2;
      for k from ilog2(M) to 1 by -1 do
        L:= convert(2^k,base,b);
        if nops(L) = nops(convert(L,set)) then return k fi
      od
    end proc:
    map(f, [$2..100]);
  • Python
    from sympy.ntheory.factor_ import digits
    def A364089(n):
        m = 1<<(l:=((r:=n**n)-(r-n)//(n-1)**2).bit_length()-1)
        while len(d:=digits(m,n)[1:]) > len(set(d)):
            l -= 1
            m >>= 1
        return l # Chai Wah Wu, Jul 07 2023

A370611 Largest square such that any two consecutive digits of its base-n expansion differ by 1 after arranging the digits in decreasing order.

Original entry on oeis.org

1, 1, 225, 4, 38025, 751689, 10323369, 355624164, 9814072356, 279740499025, 8706730814089, 86847500601, 11027486960232964, 435408094460869201, 18362780530794065025, 2492638430009890761, 39207739576969100808801, 1972312183619434816475625, 104566626183621314286288961, 13215338757299095309775089
Offset: 2

Views

Author

Jianing Song, Feb 23 2024

Keywords

Comments

By definition, a(n) <= Sum_{i=0..n-1} i*n^i = A062813(n). If n is odd and n-1 has an even number of 2s as prime factors, then there are no pandigital squares in base n, so a(n) <= Sum_{i=1..n-1} i*n^(i-1) = A051846(n-1); see A258103.
If n is odd and n-1 has an even 2-adic valuation, then a(n) <= Sum_{i=2..n-1} i*n^(i-2); see A258103. - Chai Wah Wu, Feb 25 2024

Examples

			See the Example section of A370371.
		

Crossrefs

Cf. A215014, A370370, A370610, A258103 (number of pandigital squares in base n).
The square roots are given by A370371.

Programs

  • PARI
    isconsecutive(m, n)=my(v=vecsort(digits(m, n))); for(i=2, #v, if(v[i]!=1+v[i-1], return(0))); 1 \\ isconsecutive(k, n) == 1 if and only if any two consecutive digits of the base-n expansion of m differ by 1 after arranging the digits in decreasing order
    a(n) = forstep(m=sqrtint(if(n%2==1 && valuation(n-1, 2)%2==0, n^(n-1) - (n^(n-1)-1)/(n-1)^2, n^n - (n^n-n)/(n-1)^2)), 0, -1, if(isconsecutive(m^2, n), return(m^2)))

Extensions

a(17)-a(20) from Michael S. Branicky, Feb 23 2024
a(21) from Chai Wah Wu, Feb 25 2024

A062814 a(n) = Sum_{i=0..n-1} i * (n - i)^(n - i).

Original entry on oeis.org

0, 1, 6, 38, 326, 3739, 53808, 927420, 18578248, 423649565, 10828720882, 306545462810, 9518362652994, 321605286435431, 11745699035775884, 461063683165975712, 19357125741005727156, 865493449685182242777
Offset: 1

Views

Author

Olivier Gérard, Jun 23 2001

Keywords

Comments

Partial sums of A001923. - Amiram Eldar, Mar 26 2022

Crossrefs

Programs

  • Mathematica
    Table[Sum[i*(n - i)^(n - i), {i, 0, -1 + n}], {n, 1, 18}]
  • PARI
    a(n) = sum(i=0, n-1, i*(n-i)^(n-i)); \\ Michel Marcus, Mar 26 2019

Formula

From Amiram Eldar, Mar 26 2022: (Start)
a(n) = Sum_{k=0..n-1} A001923(k).
Limit_{n->oo} a(n+2)/a(n+1) - a(n+1)/a(n) = e (Cusumano, 2013). (End)

A126688 Lowest base in which n has distinct digits.

Original entry on oeis.org

2, 2, 3, 4, 3, 3, 3, 4, 4, 5, 3, 4, 4, 4, 3, 5, 5, 4, 3, 5, 3, 5, 5, 4, 6, 6, 4, 4, 5, 4, 6, 6, 4, 6, 4, 4, 7, 5, 4, 5, 6, 5, 7, 4, 4, 7, 5, 5, 4, 4, 5, 4, 5, 4, 5, 4, 4, 5, 5, 6, 8, 6, 6, 9, 5, 5, 7, 6, 5, 5, 5, 7, 5, 7, 4, 5, 5, 4, 5, 5, 6, 5, 6, 5, 5, 5, 7, 7, 5, 6, 6, 8, 7, 6, 5, 5, 5, 8, 4, 11
Offset: 1

Views

Author

Paul Richards, Feb 15 2007

Keywords

Comments

Start with binary and work upwards, expressing n in the given base (2,3,4... b). The term a(n)=b is the lowest base in which no two digits in n are the same.
See A123699 for another version of the same sequence. - R. J. Mathar, Jun 15 2008

Examples

			75 is 1001011 in binary (base 2), 2210 in base 3 and 1023 in base 4. So a(75) = 4 since 1023 has distinct digits (and neither 1001011 nor 2210 do).
		

Crossrefs

Cf. A010784 (base 10), A062813 (gives lower bound for a term).

Programs

  • Mathematica
    Table[ b=1;Until[Length[Union[IntegerDigits[n,b]]]==Length[IntegerDigits[n,b]],b++];b,{n,100}] (* James C. McMahon, Dec 26 2024 *)

A132129 Largest prime with distinct digits when written in base n.

Original entry on oeis.org

2, 19, 19, 577, 7417, 114229, 2053313, 42373937, 987654103, 25678048763, 736867805209, 23136292864193, 789018236128391, 29043982525257901, 1147797409030815779, 48471109094902530293, 2178347851919531491093, 103805969587115219167613, 5228356786703601108008083
Offset: 2

Views

Author

Rick L. Shepherd, Aug 11 2007

Keywords

Comments

a(10) = 987654103 = A007810(9). For n >= 3, a(n) < A062813(n), a multiple of n.
Contribution from R. J. Mathar, May 15 2010: (Start)
Supposed all digits are used and the digits at positions 0 to n-1 are d_0, d_1,... d_{n-1}, the candidates are d_0+d_1*n+d_2*n^2+....+d_{n-1}*n^(n-1).
These values are (n-1)*n/2 (mod n-1), and they cannot be prime if n is even, because this number is = 0 (mod n-1) then, showing that n-1 is a divisor.
In conclusion, if n is even, the entries have at most n-1 digits in base n. (End)
If n is odd then the candidate numbers considered in the previous comment are divisible by (n-1)/2. Hence, we conclude that for n>3, a(n) has at most n-1 digits in base n. Conjecture: for n>3, a(n) has exactly n-1 digits in base n. - Eric M. Schmidt, Oct 26 2014

Examples

			a(9) = 42373937 as the prime 42373937 (base 10) = 87654102 (base 9), the largest prime number with distinct digits when represented in base 9.
		

Crossrefs

Programs

  • Sage
    def a(n) :
        if n==2 : return 2
        if n==3 : return 19
        for P in Permutations(range(n-1,-1,-1), n-1) :
            N = sum(P[-1-i]*n^i for i in range(n-1))
            if is_prime(N) : return N
    # Eric M. Schmidt, Oct 26 2014

Extensions

Removed my claim of finiteness of the sequence. - R. J. Mathar, May 18 2010
a(11)-a(20) from Eric M. Schmidt, Oct 26 2014

A364052 a(n) is the least k such that no number with distinct base-n digits is the product of k (not necessarily distinct) primes.

Original entry on oeis.org

2, 3, 7, 9, 12, 14, 14, 21, 26, 28, 33, 36, 40, 45, 36, 50, 59, 61, 65, 70, 75, 77, 85, 89, 94, 97, 104, 107, 113, 118, 84
Offset: 2

Views

Author

Robert Israel, Jul 04 2023

Keywords

Comments

A364049(n) <= a(n) <= 1 + floor(log_2(A062813(n))).

Examples

			a(4) = 7 because 2 = 2^1 = 2_4, 4 = 2^2 = 10_4, 8 = 2^3 = 20_4, 24 = 2^3 * 3 = 120_4, 108 = 2^2 * 3^3 = 1230_4 and 216 = 2^3 * 3^3 = 3120_4 have distinct base-4 digits and are products of 1 to 6 primes respectively, but there is no product of 7 primes that has distinct base-4 digits.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local d,S,V,k;
      V:= {};
      for d from 1 to n do
        S:= select(t -> t[-1] <> 0, combinat:-permute([$0..n-1],d));
        S:= map(proc(t) local i;  numtheory:-bigomega(add(t[i]*n^(i-1),i=1..d)) end proc, S);
        V:= V union convert(S,set);
      od;
      min({$1..1+max(V)} minus V)
    end proc:
    map(f, [$2..10]);

Extensions

a(11) from Jon E. Schoenfield, Jul 05 2023
a(12) from Martin Ehrenstein, Jul 07 2023
a(13)-a(18) from Jon E. Schoenfield, Jul 08 2023
a(19)-a(22) from Pontus von Brömssen, Jul 13 2023
a(23)-a(32) from Bert Dobbelaere, Jul 20 2023

A370671 a(n) = Sum_{i=2..n-1} i*n^(i-2).

Original entry on oeis.org

0, 0, 0, 2, 14, 117, 1244, 16340, 256794, 4708235, 98765432, 2334368214, 61405650470, 1779714835745, 56358445438164, 1936265501684072, 71737338064426034, 2851241711464855575, 121019325106640638448, 5463472083532379956970, 261417839335180055401662, 13215375398730198560266829
Offset: 0

Views

Author

Chai Wah Wu, Feb 25 2024

Keywords

Comments

Digits 2..(n-1) in strict descending order (n-1)..2 interpreted in base n.
Upper bound of A370371(n) when n is odd and n-1 has an even 2-adic valuation.

Crossrefs

Programs

  • Python
    def A370671(n): return (n-2)*(n**(n-1)-1)//(n-1)**2 if n > 1 else 0

Formula

a(n) = (n - 2)*(n^(n - 1) - 1)/(n - 1)^2 for n > 1.

A300326 Sum of the largest possible permutations that can be written without repetition of digits in each base from binary to n+1.

Original entry on oeis.org

0, 2, 23, 251, 3181, 47971, 848638, 17283462, 398650506, 10275193716, 292733747621, 9135147415313, 309906954656231, 11356162260536389, 447015900139452604, 18811774444632517324, 842820629057975778516, 40053081963609542635686, 2012366504118798707101875
Offset: 0

Views

Author

R. J. Cano, Mar 03 2018

Keywords

Comments

It is seems that {a(1), a(2), a(3), a(4)} are the only primes of this form.
From M. F. Hasler, Mar 04 2018: (Start)
For p = 2 and p = 3, a(n) (mod p) is 8- resp. 9-periodic.
For primes 5 <= p <= 23, a(n) (mod p) is p(p-1) periodic. I conjecture this to hold for all p >= 5.
It also appears that the last 4 terms of these periods are (1, 1, 0, 0) (mod p), for any p >= 2, i.e., a(n) is divisible by p at least for k*P-2 <= n <= k*P for any k >= 0, where P is the period length p(p-1) (resp. 8 or 9 for p = 2 and 3).
These properties might allow a proof that a(1..4) are the only primes. However, a(12) = 14231491*21776141, so there is little hope of finding a reasonably sized finite covering set.
(End)

Examples

			Let us consider the numbers: 0[1], 10[2], 210[3], 3210[4], 43210[5], and 543210[6];
Their respective decimal representations are the first six terms of A062813: 0, 2, 21, 228, 2930, 44790. The partial sums for those terms are 0, 2, 23, 251, 3181, and 47971; after 0, the following 4 sums are primes, but 47971 is not prime. The same is true for subsequent partial sums, whence the conjecture in COMMENTS.
		

Crossrefs

Partial sums of A062813.
Cf. A233783 for the occurrence of the ordered triple (2,23,251) in a different context.

Programs

Extensions

Partially edited by M. F. Hasler, Mar 05 2018
Previous Showing 11-19 of 19 results.