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-20 of 27 results. Next

A348150 a(n) is the smallest Niven (or Harshad) number with exactly n digits and not containing the digit 0.

Original entry on oeis.org

1, 12, 111, 1116, 11112, 111114, 1111112, 11111112, 111111111, 1111111125, 11111111112, 111111111126, 1111111111116, 11111111111114, 111111111111114, 1111111111111122, 11111111111111112, 111111111111111132, 1111111111111111119, 11111111111111111121, 111111111111111111117
Offset: 1

Views

Author

Bernard Schott, Oct 03 2021

Keywords

Comments

This sequence is inspired by a problem, proposed by Argentina during the 39th International Mathematical Olympiad in 1998 at Taipei, Taiwan, but not used for the competition.
The problem asked for a proof that, for each positive integer n, there exists a n-digit number, not containing the digit 0 and that is divisible by the sum of its digits (see links: Diophante in French and Kalva in English).
This sequence lists the smallest such n-digit integer.

Examples

			111114 has 6 digits, does not contain 0 and is divisible by 1+1+1+1+1+4 = 9 (111114 = 9*12346), while 111111, 111112, 111113 are not respectively divisible by sum of their digits: 6, 7, 8; hence, a(6) = 111114.
		

Crossrefs

Programs

  • Mathematica
    hQ[n_] := ! MemberQ[(d = IntegerDigits[n]), 0] && Divisible[n, Plus @@ d]; a[n_] := Module[{k = (10^n - 1)/9}, While[! hQ[k], k++]; k]; Array[a, 30] (* Amiram Eldar, Oct 03 2021 *)
  • PARI
    a(n) = for(k=(10^n-1)/9, 10^n-1, if (vecmin(digits(k)) && !(k % sumdigits(k)), return (k)));  \\ Michel Marcus, Oct 03 2021
    
  • Python
    def niven(n):
        s = str(n)
        return '0' not in s and n%sum(map(int, s)) == 0
    def a(n):
        k = int("1"*n)
        while not niven(k): k += 1
        return k
    print([a(n) for n in range(1, 22)]) # Michael S. Branicky, Oct 09 2021

Formula

a(n) = A002275(n) = R_n iff n is in A014950.

Extensions

More terms from Amiram Eldar, Oct 03 2021

A014959 Integers k such that k divides 22^k - 1.

Original entry on oeis.org

1, 3, 7, 9, 21, 27, 39, 49, 63, 81, 117, 147, 189, 243, 273, 343, 351, 441, 507, 567, 729, 819, 1029, 1053, 1143, 1323, 1521, 1701, 1911, 2187, 2401, 2457, 2943, 3081, 3087, 3159, 3429, 3549, 3969, 4401, 4563, 5103, 5733, 6561, 6591, 7203, 7371
Offset: 1

Views

Author

Keywords

Comments

Also, numbers n such that n divides s(n), where s(1)=1, s(k)=s(k-1)+k*22^(k-1) (cf. A014940).

Crossrefs

Integers n such that n divides b^n - 1: A067945 (b=3), A014945 (b=4), A067946 (b=5), A014946 (b=6), A067947 (b=7), A014949 (b=8), A068382 (b=9), A014950 (b=10), A068383 (b=11), A014951 (b=12), A116621 (b=13), A014956 (b=14), A177805 (b=15), A014957 (b=16), A177807 (b=17), A128358 (b=18), A125000 (b=19), A128360 (b=20), A014960 (b=24).

Programs

  • Mathematica
    nxt[{n_,s_}]:={n+1,s+(n+1)*22^n}; Transpose[Select[NestList[nxt,{1,1},7500], Divisible[ Last[#],First[#]]&]][[1]] (* Harvey P. Dale, Jan 27 2015 *)

Extensions

Edited by Max Alekseyev, Nov 16 2019

A275945 Numbers n such that the average of different permutations of digits of n is an integer.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 15, 17, 19, 20, 22, 24, 26, 28, 31, 33, 35, 37, 39, 40, 42, 44, 46, 48, 51, 53, 55, 57, 59, 60, 62, 64, 66, 68, 71, 73, 75, 77, 79, 80, 82, 84, 86, 88, 91, 93, 95, 97, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111
Offset: 1

Views

Author

Altug Alkan, Aug 29 2016

Keywords

Comments

Complement of A273492.
Permutations with a first digit of 0 are included in the average (i.e. 0010 is taken to be 10, 01 is taken to be 1, etc.).
From Robert Israel, Sep 01 2016: (Start)
n such that A002275(A055642(n))*A007953(n) is divisible by A055642(n).
In particular, contains all k-digit numbers if k is in A014950. (End)

Examples

			97 is a term because (97+79) is divisible by 2.
100 is a term because (1+10+100) is divisible by 3.
123 is a term because (123+132+213+231+312+321) is divisible by 6.
1001 is not a term because (11+101+110+1001+1010+1100) is not divisible by 6.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local L, d, s;
      L:= convert(n, base, 10);
      d:= nops(L);
      s:= convert(L, `+`);
      evalb(s*(10^d-1)/9 mod d = 0)
    end proc:
    select(f, [$1..10000]); # Robert Israel, Sep 01 2016
  • Mathematica
    Select[Range@ 111, IntegerQ@ Mean@ Map[FromDigits, Permutations@ #] &@ IntegerDigits@ # &] (* Michael De Vlieger, Aug 29 2016 *)
  • PARI
    A055642(n) = #Str(n);
    A007953(n) = sumdigits(n);
    for(n=1, 2000, if((((10^A055642(n)-1)/9)*A007953(n)) % A055642(n) == 0, print1(n, ", ")));

A348317 a(n) = A348150(n) - A002275(n) where A002275(n) = R_n is the repunit with n times digit 1.

Original entry on oeis.org

0, 1, 0, 5, 1, 3, 1, 1, 0, 14, 1, 15, 5, 3, 3, 11, 1, 21, 8, 10, 6, 5, 1, 3, 2, 12, 0, 17, 25, 14, 5, 13, 6, 74, 1, 54, 41, 12, 8, 14, 4, 105, 41, 55, 63, 33, 25, 13, 5, 103, 3, 33, 40, 63, 3, 52, 15, 23, 40, 21, 20, 10, 21, 11, 25, 33, 41, 47, 45, 14, 1, 171
Offset: 1

Views

Author

Bernard Schott, Oct 12 2021

Keywords

Comments

a(n) measures the gap between the smallest n-digit number not containing the digit 0 and the smallest n-digit Niven number not containing the digit 0.
For more informations and links, see A348150.
a(n) = 0 iff n is in A014950.

Examples

			A348150(4) = 1116 since it is the smallest 4-digit integer not containing the digit 0 that is divisible by the sum of its digits:1116 = (1+1+1+6) * 124;  A002275(4) = R_4 = 1111, hence a(4) = 1116 - 1111 = 5.
		

Crossrefs

Programs

  • Mathematica
    hQ[n_] := ! MemberQ[(d = IntegerDigits[n]), 0] && Divisible[n, Plus @@ d]; a[n_] := Module[{m= (10^n - 1)/9,k=0}, While[! hQ[m+k], k++]; k]; Array[a, 30] (* Amiram Eldar, Oct 13 2021 *)
  • PARI
    a(n) = my(r=(10^n-1)/9); for(k=r, 10^n-1, if (vecmin(digits(k)) && !(k % sumdigits(k)), return (k-r))); \\ Michel Marcus, Oct 13 2021
  • Python
    def a(n):
        s, k = "1"*n, int("1"*n)
        while '0' in s or k%sum(map(int, s)): k += 1; s = str(k)
        return k - int("1"*n)
    print([a(n) for n in range(1, 73)]) # Michael S. Branicky, Oct 12 2021
    

Formula

a(n) = A348150(n) - A002275(n).

Extensions

a(23) and beyond from Michael S. Branicky, Oct 12 2021

A273492 Numbers n such that the average of different permutations of digits of n is not an integer.

Original entry on oeis.org

10, 12, 14, 16, 18, 21, 23, 25, 27, 29, 30, 32, 34, 36, 38, 41, 43, 45, 47, 49, 50, 52, 54, 56, 58, 61, 63, 65, 67, 69, 70, 72, 74, 76, 78, 81, 83, 85, 87, 89, 90, 92, 94, 96, 98, 1000, 1001, 1002, 1004, 1005, 1006, 1008, 1009, 1010, 1011, 1013, 1014, 1015, 1017, 1018, 1019, 1020, 1022, 1023, 1024
Offset: 1

Views

Author

Altug Alkan, Aug 29 2016

Keywords

Comments

Complement of A275945.
Permutations with a first digit of 0 are included in the average (i.e. 0010 is taken to be 10, 01 is taken to be 1, etc.).
From Robert Israel, Sep 01 2016: (Start)
n such that A002275(A055642(n))*A007953(n) is not divisible by A055642(n).
In particular, contains no k-digit numbers if k is in A014950. (End)

Examples

			12 is a term because (12+21) = 33 is not divisible by 2.
1000 is a term because (1+10+100+1000) = 1111 is not divisible by 4.
123 is not a term because (123+132+213+231+312+321) is divisible by 6.
1001 is a term because (11+101+110+1001+1010+1100) is not divisible by 6.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local L,d,s;
      L:= convert(n,base,10);
      d:= nops(L);
      s:= convert(L,`+`);
      evalb(s*(10^d-1)/9 mod d = 0)
    end proc:
    remove(f, [$1..10000]); # Robert Israel, Sep 01 2016
  • Mathematica
    Select[Range[2^10], ! IntegerQ@ Mean@ Map[FromDigits, Permutations@ #] &@ IntegerDigits@ # &] (* Michael De Vlieger, Aug 29 2016 *)
  • PARI
    A055642(n) = #Str(n);
    A007953(n) = sumdigits(n);
    for(n=1, 2000, if((((10^A055642(n)-1)/9)*A007953(n)) % A055642(n) != 0, print1(n, ", ")));

A348316 a(n) is the largest Niven (or Harshad) number with exactly n digits and not containing the digit 0.

Original entry on oeis.org

9, 84, 999, 9963, 99972, 999984, 9999966, 99999966, 999999999, 9999999828, 99999999898, 999999999853, 9999999999936, 99999999999783, 999999999999984, 9999999999999858, 99999999999999939, 999999999999999831, 9999999999999999951, 99999999999999999922, 999999999999999999687
Offset: 1

Views

Author

Bernard Schott, Oct 11 2021

Keywords

Comments

This sequence is inspired by a problem, proposed by Argentina during the 39th International Mathematical Olympiad in 1998 at Taipei, Taiwan, but not used for the competition.
The problem asked for a proof that, for each positive integer n, there exists a n-digit number, not containing the digit 0 and that is divisible by the sum of its digits (see links: Diophante in French and Kalva in English).
This sequence lists the largest such n-digit integer.

Examples

			9963 has 4 digits, does not contain 0 and is divisible by 9+9+6+3 = 27 (9963 = 27*369), while there is no integer k with 9964 <= k <= 9999 that is divisible by sum of its digits, hence a(4) = 9963.
		

Crossrefs

Programs

  • Mathematica
    hQ[n_] := ! MemberQ[(d = IntegerDigits[n]), 0] && Divisible[n, Plus @@ d]; a[n_] := Module[{k = 10^n}, While[! hQ[k], k--]; k]; Array[a, 20] (* Amiram Eldar, Oct 11 2021 *)
  • Python
    def a(n):
        s, k = "9"*n, int("9"*n)
        while '0' in s or k%sum(map(int, s)): k -= 1; s = str(k)
        return k
    print([a(n) for n in range(1, 22)]) # Michael S. Branicky, Oct 11 2021

Formula

a(n) = A002283(n) = 10^n - 1 iff n is in A014950 (compare with A348150 formula).

Extensions

More terms from Amiram Eldar, Oct 11 2021

A014962 Odd numbers k that divide 25^k - 1.

Original entry on oeis.org

1, 3, 9, 21, 27, 63, 81, 93, 147, 171, 189, 243, 279, 441, 513, 567, 609, 651, 729, 837, 903, 1029, 1197, 1323, 1539, 1701, 1827, 1953, 2187, 2511, 2667, 2709, 2883, 2943, 3087, 3249, 3591, 3969, 4263, 4401, 4557, 4617, 5103, 5301, 5481, 5859, 6321
Offset: 1

Views

Author

Keywords

Comments

Also, numbers k such that k divides s(k), where s(1)=1, s(j) = s(j-1) + j*25^(j-1).
Equivalently, numbers k that divide ((24*k - 1)*25^k + 1) / 24^2 (cf. A014943).

Crossrefs

Programs

  • Maple
    select(t -> 25 &^ t - 1 mod t = 0, [seq(i,i=1..10^4,2)]); # Robert Israel, Oct 04 2020

Extensions

Edited by Max Alekseyev, Nov 16 2019

A098034 Numbers that are divisible both by the sum and by the product of the squares of their digits.

Original entry on oeis.org

111, 11112, 1122112, 111111111, 122121216, 1111112112, 1111211136, 1116122112, 1211162112, 11111113116, 11111121216, 11112122112, 11121114112, 11132111232, 11133122112, 11213111232, 11311322112, 12111213312, 21111311232, 31111221312
Offset: 1

Views

Author

Lekraj Beedassy, Sep 10 2004

Keywords

Comments

Also called "uncommon numbers". Sequence contains the repunits R_m, where m=A014950,m>1. - Lekraj Beedassy, Jul 14 2008
Called "insolite numbers" in the paper by J.-M. De Koninck and N. Doyon, which contains a list of insolite numbers below 10^18. Their list lacks a(63)=112264112111616. They conjectured that 1111111111131111131111111111175 is the smallest insolite number containing the digit '5'. I verified this claim and found a further such number, 1111111111111111117111111111911111375, which may not be the second one. - Giovanni Resta, Oct 19 2012

Examples

			1122112 is in the sequence because 1^2 + 1^2 + 2^2 + 2^2 + 1^2 + 1^2 + 2^2=16,(1*1*2*2*1*1*2)^2=64 and we have 1122112=16*70132=64*17533.
		

References

  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 111, p. 39, Ellipses, Paris 2008.

Extensions

More terms from Lekraj Beedassy, Jul 14 2008
Missing term a(11) inserted, b-file corrected and extended to terms < 10^20 by Giovanni Resta, Oct 19 2012

A119888 Numbers n such that (n,R_n)>1, where R_n=(10^n -1)/9=A002275(n).

Original entry on oeis.org

3, 6, 9, 12, 15, 18, 21, 22, 24, 27, 30, 33, 36, 39, 42, 44, 45, 48, 51, 54, 57, 60, 63, 66, 69, 72, 75, 78, 81, 84, 87, 88, 90, 93, 96, 99, 102, 105, 108, 110, 111, 114, 117, 120, 123, 126, 129, 132, 134, 135, 138, 141, 144, 150, 153, 154
Offset: 1

Views

Author

Lekraj Beedassy, Aug 04 2006

Keywords

Comments

Includes all multiples of 3 (A008585) and multiples of 11 with coefficients A063450. A special subsequence is A014950.

Crossrefs

Cf. A119905.

A122787 a(n) is the smallest prime p such that the multiplicative order of 10 modulo p is 3^n.

Original entry on oeis.org

3, 37, 333667, 757, 163, 411361786890737698932559, 313471, 2558791, 618846643, 2238862519, 396319276163359, 34720813
Offset: 0

Views

Author

Farideh Firoozbakht, Oct 06 2006

Keywords

Comments

For n>0, a(n) is the smallest prime p>3 such that 3^n*p but not 3^(n-1)*p is a solution to 10^x==1 (mod x). A014950 gives solutions of this equation. It's obvious that if n is a term of A014950 then 3n is also a term of A014950. So according to the definition of a(n), for each m>n-1, 3^m*a(n) is in the sequence A014950.
a(n) is the smallest prime divisor of \Phi_{3^n}(10)/3, where \Phi_k(x) is k-th cyclotomic polynomial. a(n) is congruent to 1 modulo 3^n and 1, 3, 9, 13, 27, 31, 37, or 39 modulo 40. - Max Alekseyev, Nov 18 2014
a(12)>10^17, a(13)=796884087799, a(14)=86093443, a(15)=70367039929, a(16)>8*10^18, a(17)=662489036191, a(18)>10^19, a(19)>10^19, a(20)=38180289190951, a(21)=28305715767319, a(22)>10^20, a(23)>10^20, a(24)=63829075244707. - Ray Chandler, Dec 25 2013

Examples

			p=333667 is the smallest prime such that multiplicative order of 10 modulo p is 3^2, so a(2)=333667.
		

Crossrefs

Programs

  • PARI
    a(n) = factor(polcyclo(3^n,10)/3)[1,1] \\ Max Alekseyev, Nov 18 2014

Extensions

Revised and extended by Max Alekseyev, Apr 25 2009
a(13), a(15), a(17), a(20), a(21), a(24) from Ray Chandler, Dec 25 2013
Previous Showing 11-20 of 27 results. Next