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 91-100 of 104 results. Next

A096044 Triangle read by rows: T(n,k) = (n+1,k)-th element of (M^10-M)/9, where M is the infinite lower Pascal's triangle matrix, 1<=k<=n.

Original entry on oeis.org

1, 11, 2, 111, 33, 3, 1111, 444, 66, 4, 11111, 5555, 1110, 110, 5, 111111, 66666, 16665, 2220, 165, 6, 1111111, 777777, 233331, 38885, 3885, 231, 7, 11111111, 8888888, 3111108, 622216, 77770, 6216, 308, 8, 111111111, 99999999, 39999996, 9333324, 1399986, 139986, 9324, 396, 9
Offset: 1

Views

Author

Gary W. Adamson, Jun 17 2004

Keywords

Examples

			Triangle T(n,k) begins:
       1;
      11,     2;
     111,    33,     3;
    1111,   444,    66,    4;
   11111,  5555,  1110,  110,   5;
  111111, 66666, 16665, 2220, 165, 6;
  ...
		

Crossrefs

Cf. A007318. First column gives A000042. Row sums give A016135.

Programs

  • Maple
    P:= proc(n) option remember; local M; M:= Matrix(n, (i, j)-> binomial(i-1, j-1)); (M^10-M)/9 end: T:= (n, k)-> P(n+1)[n+1, k]: seq(seq(T(n, k), k=1..n), n=1..11);  # Alois P. Heinz, Oct 07 2009
  • Mathematica
    P[n_] := P[n] = With[{M = Array[Binomial[#1-1, #2-1]&, {n, n}]}, (MatrixPower[M, 10] - M)/9]; T[n_, k_] := P[n+1][[n+1, k]]; Table[ Table[T[n, k], {k, 1, n}], {n, 1, 11}] // Flatten (* Jean-François Alcover, Jan 28 2015, after Alois P. Heinz *)

Extensions

Edited and more terms from Alois P. Heinz, Oct 07 2009

A100563 Number of bases less than sqrt(n) in which n is a palindrome.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 2, 0, 0, 1, 2, 0, 1, 0, 1, 2, 1, 1, 1, 0, 2, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 2, 0, 0, 1, 1, 2, 2, 0, 0, 2, 1, 2, 0, 1, 0, 1, 1, 2, 1, 3, 0, 2, 1, 0, 0, 1, 1, 2, 1, 0, 0, 0, 2, 0, 2, 1, 2, 1, 0, 3, 1, 0, 1, 1, 0, 2, 2, 2, 0, 0, 0, 1, 2, 1, 3, 1, 0, 0, 2, 2
Offset: 1

Views

Author

Gordon Hamilton, Nov 29 2004

Keywords

Comments

Is there a number m such that a(n) > 0 for all n > m? I call the set of numbers for which a(n)=0 "unkempt" for refusing to use a mirror in any base. Is there an infinite number of unkempt numbers? a(n) can be arbitrarily large.
The sequence A123586 gives the values of n where a(n)=0. - Robert G. Wilson v, Nov 01 2014
Is there a closed-form formula for this function? - Robert G. Wilson v, Nov 01 2014
From Robert G. Wilson v, Nov 26 2014: (Start)
The first occurrence, beginning at 0, of n is: 1, 5, 17, 65, 121, 562, 1432, 1477, 4369, 36582, 35101, 86677, 83161, 360361, 291721, 720721, 887041, 1496881, 1670761, 3931201, 3341521, 5654881, 7207201, 7761601,...
Positions where a(n)=k:
k = 0: A123586;
k = 1: 5, 7, 9, 10, 13, 15, 16, 20, 23, 25, 27, 28, 29, 33, 34, 36, 37, 38, 40, ...;
k = 2: 17, 21, 26, 31, 46, 51, 52, 55, 57, 63, 67, 73, 78, 80, 82, 91, 92, 93, 98, ...;
k = 3: 65, 85, 100, 130, 154, 164, 170, 178, 191, 195, 203, 209, 242, 282, 292, ...;
k = 4: 121, 235, 255, 257, 273, 300, 325, 341, 343, 373, 400, 495, 601, 610, 626, 666, ...;
k = 5: 562, 676, 771, 819, 1009, 1111, 1220, 1333, 1365, 1441, 1543, 1978, 1981, 2000, ...;
k = 6: 1432, 2380, 2666, 2925, 3280, 4035, 4095, 4161, 4225, 4401, 4525, 4561, 4681, ...;
k = 7: 1477, 4097, 4591, 7141, 7993, 8191, 9640, 10081, 10297, 10626, 10858, 11761, ...; etc.
(End)

Examples

			100 is a palindrome in bases 3, 7 and 9, so a(100) = 3.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Module[{p}, Table[ p = IntegerDigits[n, b]; If[p == Reverse@ p, {b, p}, Sequence @@ {}], {b, 2, Sqrt@ n}]]; Array[ Length@ f@# &, 105] (* Robert G. Wilson v, Nov 01 2014 *)
  • PARI
    a(n) = {my(nb = 0); for (b=2, sqrt(n), d = digits(n, b); nb+= (Vecrev(d) == d);); nb;} \\ Michel Marcus, Nov 05 2014

Formula

a(n) = A135551(n) - A033831(n). - Robert G. Wilson v, Nov 01 2014

Extensions

a(58) from Robert G. Wilson v, Nov 05 2014

A131664 A string of n 1's repeated n times.

Original entry on oeis.org

1, 11, 11, 111, 111, 111, 1111, 1111, 1111, 1111, 11111, 11111, 11111, 11111, 11111, 111111, 111111, 111111, 111111, 111111, 111111, 1111111, 1111111, 1111111, 1111111, 1111111, 1111111, 1111111, 11111111, 11111111, 11111111, 11111111
Offset: 1

Views

Author

Paul Curtz, Oct 03 2007

Keywords

Crossrefs

Programs

  • Maple
    seq(((10^n-1)/9)$n, n=1..10); # Robert Israel, Jul 08 2019
  • Python
    from math import isqrt
    def A131664(n): return (10**(isqrt(n<<3)+1>>1)-1)//9 # Chai Wah Wu, Oct 17 2022

Formula

G.f.: z/(1-z) * Sum_{n>=0} 10^n*z^(n*(n+1)/2).

A137318 Concatenation of segments of the digit sequence 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3....

Original entry on oeis.org

1, 31, 313, 1313, 13131, 313131, 3131313, 13131313, 131313131, 3131313131, 31313131313, 131313131313, 1313131313131, 31313131313131, 313131313131313, 1313131313131313, 13131313131313131, 313131313131313131
Offset: 1

Views

Author

Ctibor O. Zizka, Apr 06 2008

Keywords

Comments

A000042 is 1,11,111,1111,11111,... concatenation of 111111111111111....
A002276 is 2,22,222,2222,22222,... concatenation of 222222222222222....
A133013 is 2,35,71113,... concatenation of 2 3 5 7 11 13 17 19 23 29,...

Crossrefs

Programs

  • Mathematica
    Module[{nn=20},FromDigits/@TakeList[PadRight[{},(nn(nn+1))/2,{1,3}],Range[ nn]]] (* Harvey P. Dale, Aug 04 2021 *)

Formula

O.g.f.: x*(100x^4 + 200x^3 + 83x^2 + 20x + 1)/((10x-1)(100x^2+1)(x-1)(x^2+1)). - R. J. Mathar, Apr 09 2008

Extensions

More terms from R. J. Mathar, Apr 09 2008

A246757 Largest n-digit number divisible by the product of its decimal digits.

Original entry on oeis.org

9, 36, 816, 9612, 93744, 973728, 9939915, 99221112, 997711344, 9993393711, 99934212672, 999641938176, 9999121936392, 99996414731136, 999994123418112, 9999982411646976, 99999318116613312, 999991631331122112, 9999944111773994112, 99999911232931433472, 999999832211912282112
Offset: 1

Views

Author

Max Alekseyev, Sep 02 2014

Keywords

Comments

The smallest such numbers are given by repunits A000042 or A002275.

Crossrefs

Subsequence of A007602.

Programs

  • PARI
    { A246757(n) = my(m,d,p,q); m=n\2; forstep(k=10^m-1,(10^m-1)/9,-1, d=digits(k); q=prod(i=1,#d,d[i]); if(q==0,next); forstep(s=(((k+1)*10^(n-m))\q)*q,k*10^(n-m),-q,  d=digits(s); p=prod(i=1,#d,d[i]); if(p==0 || s%p,next); return(s) )) }
    
  • Python
    from operator import mul
    from functools import reduce
    def A246757(n):
        for i in range(10**n-1,int('1'*n)-1,-1):
            pd = reduce(mul,(int(d) for d in str(i)))
            if pd and not i % pd:
                return i # Chai Wah Wu, Sep 08 2014

A360574 Binary expansions of odd numbers with three zeros in their binary expansion.

Original entry on oeis.org

10001, 100011, 100101, 101001, 110001, 1000111, 1001011, 1001101, 1010011, 1010101, 1011001, 1100011, 1100101, 1101001, 1110001, 10001111, 10010111, 10011011, 10011101, 10100111, 10101011, 10101101, 10110011, 10110101, 10111001, 11000111, 11001011, 11001101, 11010011, 11010101, 11011001, 11100011
Offset: 1

Views

Author

Bernard Schott, Feb 18 2023

Keywords

Comments

For m >= 5, there are A000292(m-4) terms with m digits.

Examples

			1010101 has three digits 0 and is the binary expansion of the odd integer 85, so 1010101 is a term.
		

Crossrefs

Similar, but with k zeros in their binary expansion: A000042 (k=0), A190619 (k=1), A357774 (k=2).

Programs

  • Mathematica
    FromDigits[IntegerDigits[#, 2]] & /@ Select[Range[1, 250, 2], DigitCount[#, 2, 0] == 3 &] (* Amiram Eldar, Feb 18 2023 *)
  • Python
    from itertools import count, islice
    from sympy.utilities.iterables import multiset_permutations
    def A360574_gen(): # generator of terms
        yield from (int('1'+''.join(d)+'1') for l in count(0) for d in  multiset_permutations('000'+'1'*l))
    A360574_list = list(islice(A360574_gen(),30)) # Chai Wah Wu, Feb 18 2023

Formula

a(n) = A007088(A360573(n)).

A046421 Index of smallest repunit having exactly n prime factors (counted with multiplicity).

Original entry on oeis.org

1, 2, 3, 13, 8, 6, 15, 12, 28, 18, 24, 32, 36, 30, 54, 42, 78, 100, 72, 176, 60, 208, 84, 132, 160, 198, 120, 204, 216, 308, 168, 280, 306, 180, 210, 264, 270, 252, 378, 336, 300
Offset: 0

Views

Author

Patrick De Geest, Jul 15 1998

Keywords

Comments

a(40) = 300; all other subsequent terms are > 322. - Ray Chandler, Apr 23 2017
a(41) <= 684, a(42) <= 546, a(43) <= 528, a(44) <= 462, a(45) = 360, a(46) <= 576, a(47) <= 624, a(48) <= 768. - Daniel Suteu, Jan 21 2023

Examples

			For n = 5: R_6 = 111111 = 3*7*11*13*37 is the smallest repunit with five prime factors, so a(5) = 6.
		

Crossrefs

Cf. A086565 (equivalent with distinct prime factors).

Programs

  • PARI
    a(n) = my(k=1); while(bigomega((10^k - 1)/9) !=n, k++); k; \\ Michel Marcus, Apr 23 2017

Extensions

a(1) = 2 inserted and a(19)-a(37) added by Ray Chandler, Apr 23 2017
a(38)-a(40) from Jinyuan Wang, Apr 17 2020
Name corrected by Felix Fröhlich, Jun 04 2022

A057303 Numbers n such that the number of distinct digits in n is a digit of n.

Original entry on oeis.org

1, 11, 12, 20, 21, 23, 24, 25, 26, 27, 28, 29, 32, 42, 52, 62, 72, 82, 92, 103, 111, 112, 121, 122, 123, 130, 132, 134, 135, 136, 137, 138, 139, 143, 153, 163, 173, 183, 193, 200, 202, 203, 211, 212, 213, 220, 221, 223, 224, 225, 226, 227, 228, 229, 230, 231
Offset: 1

Views

Author

Simon Colton (simonco(AT)cs.york.ac.uk), Aug 25 2000

Keywords

Comments

The repunits (A000042) are a subsequence. Analogous in construction to the refactorable numbers (A033950).

Examples

			103 has 3 distinct digits in base 10 and 3 is a base 10 digit of 103.
		

References

  • S. Colton, Unpublished PhD Thesis, University of Edinburgh, 2000.

Crossrefs

Cf. A000042.

Programs

  • PARI
    isok(n) = {my(d = vecsort(digits(n),,8)); vecsearch(d, #d);} \\ Michel Marcus, Feb 23 2016

A075244 Least number requiring the base n to produce a prime by base reversal.

Original entry on oeis.org

2, 3, 15, 8, 109, 9, 119, 16, 27, 70, 2197, 36, 1265, 158, 213, 178, 4205, 126, 14189, 260, 273, 304, 4865, 120, 1295, 78, 81, 532, 44323, 150, 47317, 952, 771, 102, 16705, 492, 6209, 114, 1209, 2020, 132743, 294, 22945, 2834, 2721, 2276, 66455, 144
Offset: 1

Views

Author

Robert G. Wilson v, Sep 09 2002

Keywords

Comments

Question, Is every base necessary to convert the natural numbers into primes?

Examples

			a(1) = 2 because two = 11 in unary (A000042) and its reversal 11 = 2. a(2) = 3 because three = 11 in base 2 (A007088) and its reversal 11 in base 2 = 3. a(3) = 15 because fifteen = 120 in base 3 (A007089) and its reversal 21 in base 3 = 7. a(4) = 8 -> 2. a(7) = 119 because 119 base 7 = 230 in base 7 (A007093) and its reversal 32 base 7 = 161.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{b = 2}, While[b < n && !PrimeQ[ FromDigits[ Reverse[ IntegerDigits[n, b]], b]], b++ ]; If[b != n, b, 0]]; a = Table[0, {70}]; Do[b = f[n]; If[b < 76 && a[[b]] == 0, a[[b]] = n], {n, 2, 133000}]

A083808 Smallest prime == 1 (mod n-th unary number U(n) = (10^n-1)/9).

Original entry on oeis.org

2, 23, 223, 24443, 199999, 666667, 19999999, 22222223, 666666667, 44444444441, 22222222223, 2444444444443, 17777777777777, 88888888888889, 1333333333333333, 64444444444444439, 88888888888888889
Offset: 1

Views

Author

Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), May 08 2003

Keywords

Examples

			a(4) = 24443 ==1 (mod 1111).
		

Crossrefs

Cf. A000042.

Programs

  • Maple
    with(numtheory): for n from 1 to 30 do u := (10^n-1)/9: for j from u+1 to 1000*u+1 by u do if isprime(j) then printf(`%d,`,j); break; fi: od:od:

Extensions

Corrected and extended by James Sellers, May 19 2003
Previous Showing 91-100 of 104 results. Next