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 101-110 of 506 results. Next

A164771 Numbers k such that the average digit of k^2 is 1.

Original entry on oeis.org

1, 1049, 1490, 10002, 10005, 10011, 10020, 10050, 10101, 10110, 10149, 10200, 10500, 11001, 11010, 11100, 11490, 12000, 14499, 15000, 17610, 18000, 20001, 20010, 20100, 21000, 24900, 30000, 33200, 35000, 36100, 44900, 44990, 45100
Offset: 1

Views

Author

Zak Seidov, Aug 26 2009

Keywords

Comments

There are 117 such n's < 10^7: 1, 1049, 1490, 10002, 10005, 10011, 10020, 10050, 10101, 10110, 10149, 10200, 10500, 11001, 11010, 11100, 11490, 12000, 14499, 15000, 17610, 18000, 20001, 20010, 20100, 21000, 24900, 30000, 33200, 35000, 36100, 44900, 44990, 45100, 46000, 54800, 55000, 64900, 71000, 80000, 1000006, 1000015, 1000051, 1000055, 1000060, 1000105, 1000150, 1000501, 1000510, 1000550, 1000600, 1001005, 1001050, 1001500, 1005001, 1005010, 1005100, 1005500, 1006000, 1006490, 1009951, 1010005, 1010050, 1010149, 1010500, 1011490, 1015000, 1024900, 1050001, 1050010, 1050100, 1051000, 1055000, 1060000, 1064900, 1095500, 1096000, 1100005, 1100050, 1100500, 1105000, 1114900, 1145000, 1150000, 1190000, 1224749, 1244990, 1249000, 1414249, 1415000, 1420000, 1424900, 1429000, 1451000, 1460000, 1484251, 1500001, 1500010, 1500100, 1501000, 1510000, 1550000, 1600000, 1735000, 1739000, 1789000, 1820000, 2000005, 2000050, 2000500, 2005000, 2050000, 2239000, 2261000, 2450000, 2500000, 2900000.
Or: Numbers k such that k^2 is in A061384, i.e., square root of squares in A061384. - M. F. Hasler, Dec 05 2010

Examples

			1049 is a term because 1049^2 = 1100401 and (1 + 1 + 0 + 0 + 4 + 0 + 1)/7 = 1.
		

Crossrefs

Subsequence of A164817.
Average of digits of n^2 = s: A164771 (s=1), A164770 (s=2), A164782 (s=3), A164776 (s=4), A164774 (s=5), A164778 (s=6), A164773 (s=7), A164772 (s=8).

Programs

  • Mathematica
    Select[Range[50000],Mean[IntegerDigits[#^2]]==1&] (* Harvey P. Dale, Dec 15 2014 *)
  • PARI
    {for(d=1,9, for(n=sqrtint(10^(d-1)-1)+1, sqrtint(10^d-1), my(n2=divrem(n^2,10)); sum( k=2,d, (n2=divrem(n2[1],10))[2],n2[2])/d==1 & print1(n",")))}  \\ M. F. Hasler, Dec 05 2010

Formula

A055642(a(n)^2) = A007953(a(n)^2). - M. F. Hasler, Dec 05 2010

Extensions

Terms up to a(117) checked with given PARI code by M. F. Hasler, Dec 05 2010

A178361 Numbers with rounded up arithmetic mean of digits = 1.

Original entry on oeis.org

1, 10, 11, 20, 100, 101, 102, 110, 111, 120, 200, 201, 210, 300, 1000, 1001, 1002, 1003, 1010, 1011, 1012, 1020, 1021, 1030, 1100, 1101, 1102, 1110, 1111, 1120, 1200, 1201, 1210, 1300, 2000, 2001, 2002, 2010, 2011, 2020, 2100, 2101, 2110, 2200, 3000, 3001
Offset: 1

Views

Author

Reinhard Zumkeller, May 27 2010

Keywords

Comments

A004427(a(n)) = 1;
A000027 = union of A178362, A178363, A178364, A178365, A178366, A178367, A178368, A178369, and this sequence.

Crossrefs

Programs

  • Haskell
    a178361 n = a178361_list !! (n-1)
    a178361_list = [x | x <- [1..], a007953 x <= a055642 x]
    -- Reinhard Zumkeller, May 06 2015
  • Mathematica
    Select[Range[4000],Ceiling[Mean[IntegerDigits[#]]]==1&] (* Harvey P. Dale, Dec 31 2019 *)

Formula

A007953(a(n)) <= A055642(a(n)). - Reinhard Zumkeller, May 06 2015

A317716 Square array A(n, k), read by antidiagonals downwards: k-th prime p such that cyclic digit shifts produce exactly n different primes.

Original entry on oeis.org

2, 3, 13, 5, 17, 113, 7, 31, 131, 1193, 11, 37, 197, 1931, 11939, 19, 71, 199, 3119, 19391, 193939, 23, 73, 311, 3779, 19937, 199933, 17773937, 29, 79, 337, 7793, 37199, 319993, 39371777, 119139133, 41, 97, 373, 7937, 39119, 331999, 71777393, 133119139
Offset: 1

Views

Author

Felix Fröhlich, Aug 05 2018

Keywords

Comments

k-th prime p such that A262988(p) = n.
Are all rows of the array infinite?
A term q of A270083 occurs in row A055642(q) - 1 in this array.
A term r of A293663 occurs in row A055642(r) in this array.
Row 1 is a supersequence of A004022.
Column 1 is A247153.

Examples

			Array starts
          2,         3,         5,         7,        11,        19,        23, ...
         13,        17,        31,        37,        71,        73,        79, ...
        113,       131,       197,       199,       311,       337,       373, ...
       1193,      1931,      3119,      3779,      7793,      7937,      9311, ...
      11939,     19391,     19937,     37199,     39119,     71993,     91193, ...
     193939,    199933,    319993,    331999,    391939,    393919,    919393, ...
   17773937,  39371777,  71777393,  73937177,  77393717,  77739371,  93717773, ...
  119139133, 133119139, 139133119, 191391331, 311913913, 331191391, 913311913, ...
...
		

Crossrefs

Programs

  • PARI
    eva(n) = subst(Pol(n), x, 10)
    rot(n) = if(#Str(n)==1, v=vector(1), v=vector(#n-1)); for(i=2, #n, v[i-1]=n[i]); u=vector(#n); for(i=1, #n, u[i]=n[i]); v=concat(v, u[1]); v
    count_primes(n) = my(d=digits(n), i=0); while(1, if(ispseudoprime(eva(d)), i++); d=rot(d); if(d==digits(n), return(i)))
    row(n, terms) = my(i=0); forprime(p=1, , if(count_primes(p)==n, print1(p, ", "); i++); if(i==terms, print(""); break))
    array(rows, cols) = for(x=1, rows, row(x, cols))
    array(7, 7) \\ print initial 7 rows and 7 columns of array

A053816 Another version of the Kaprekar numbers (A006886): n such that n = q+r and n^2 = q*10^m+r, for some m >= 1, q >= 0 and 0 <= r < 10^m, with n != 10^a, a >= 1 and n an m-digit number.

Original entry on oeis.org

1, 9, 45, 55, 99, 297, 703, 999, 2223, 2728, 4950, 5050, 7272, 7777, 9999, 17344, 22222, 77778, 82656, 95121, 99999, 142857, 148149, 181819, 187110, 208495, 318682, 329967, 351352, 356643, 390313, 461539, 466830, 499500, 500500, 533170, 538461, 609687, 643357
Offset: 1

Views

Author

Keywords

Comments

Consider an m-digit number n. Square it and add the right m digits to the left m or m-1 digits. If the resultant sum is n, then n is a term of the sequence.
4879 and 5292 are in A006886 but not in this version.
Shape of plot (see links) seems to consist of line segments whose lengths along the x-axis depend on the number of unitary divisors of 10^m-1 which is equal to 2^w if m is a multiple of 3 or 2^(w+1) otherwise, where w is the number of distinct prime factors of the repunit of length m (A095370). w for m = 60 is 20, whereas w <= 15 for m < 60. This leads to the long segment corresponding to m = 60. - Chai Wah Wu, Jun 02 2016
If n*(n-1) is divisible by 10^m-1 then n is a term where m is the number of decimal digits in n. - Giorgos Kalogeropoulos, Mar 27 2025

Examples

			703 is Kaprekar because 703 = 494 + 209, 703^2 = 494209.
		

References

  • D. R. Kaprekar, On Kaprekar numbers, J. Rec. Math., 13 (1980-1981), 81-82.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers, Penguin Books, NY, 1986, p. 151.

Crossrefs

Programs

  • Haskell
    a053816 n = a053816_list !! (n-1)
    a053816_list = 1 : filter f [4..] where
       f x = length us - length vs <= 1 &&
             read (reverse us) + read (reverse vs) == x
             where (us, vs) = splitAt (length $ show x) (reverse $ show (x^2))
    -- Reinhard Zumkeller, Oct 04 2014
    
  • Mathematica
    kapQ[n_]:=Module[{idn2=IntegerDigits[n^2],len},len=Length[idn2];FromDigits[ Take[idn2,Floor[len/2]]]+FromDigits[Take[idn2, -Ceiling[len/2]]]==n]; Select[Range[540000],kapQ] (* Harvey P. Dale, Aug 22 2011 *)
    ktQ[n_] := ((x = n^2) - (z = FromDigits[Take[IntegerDigits[x], y = -IntegerLength[n]]]))*10^y + z == n; Select[Range[540000], ktQ] (* Jayanta Basu, Aug 04 2013 *)
    Select[Range[540000],Total[FromDigits/@TakeDrop[IntegerDigits[#^2], Floor[ IntegerLength[ #^2]/2]]] ==#&] (* The program uses the TakeDrop function from Mathematica version 10 *) (* Harvey P. Dale, Jun 03 2016 *)
    maxDigits=6; Flatten[Table[lst={};sub=Subsets@FactorInteger[v=10^d-1]; Do[a=Times@@Power@@@s; n=ChineseRemainder[{0,1},{a,v/a},1]; If[10^(d-1)<=n<10^d,AppendTo[lst,n]],{s,sub}];Union@lst,{d,maxDigits}]] (* Giorgos Kalogeropoulos, Mar 27 2025 *)
  • PARI
    isok(n) = n == vecsum(divrem(n^2, 10^(1+logint(n, 10)))); \\ Ruud H.G. van Tol, Jun 02 2024
    
  • Python
    def is_A053816(n): return n==sum(divmod(n**2,10**len(str(n)))) and n
    print(upto_1e5:=list(filter(is_A053816, range(10**5)))) # M. F. Hasler, Mar 28 2025

Extensions

More terms from Michel ten Voorde, Apr 11 2001

A066022 Number of digits in n^n.

Original entry on oeis.org

1, 1, 2, 3, 4, 5, 6, 8, 9, 11, 12, 13, 15, 17, 18, 20, 21, 23, 25, 27, 28, 30, 32, 34, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 88, 90, 92, 94, 96, 98, 101, 103, 105, 107, 109, 112, 114, 116, 118, 121, 123, 125
Offset: 1

Views

Author

Robert A. Stump (bee_ess107(AT)yahoo.com), Dec 11 2001

Keywords

Comments

This is almost certainly the same as the number of decimal digits of the sum of the n-th powers of the divisors of n (a sequence submitted by Labos Elemer on Jan 14 2002). Although no formal proof for this is known, Jon E. Schoenfield has verified it for n up to 10^8 and has given a plausible heuristic argument that it is true for all n.

Crossrefs

Programs

Formula

a(n) = A055642(A000312(n)). - Michel Marcus, Dec 05 2019

Extensions

Edited by N. J. A. Sloane Jan 03 2009 at the suggestion of Jon E. Schoenfield.

A066686 Array T(i,j) read by antidiagonals, where T(i,j) is the concatenation of i and j (1<=i, 1<=j).

Original entry on oeis.org

11, 12, 21, 13, 22, 31, 14, 23, 32, 41, 15, 24, 33, 42, 51, 16, 25, 34, 43, 52, 61, 17, 26, 35, 44, 53, 62, 71, 18, 27, 36, 45, 54, 63, 72, 81, 19, 28, 37, 46, 55, 64, 73, 82, 91, 110, 29, 38, 47, 56, 65, 74, 83, 92, 101, 111, 210, 39, 48, 57, 66, 75, 84, 93, 102, 111
Offset: 1

Views

Author

Robert G. Wilson v, Jan 11 2002

Keywords

Comments

The element at T(i,j) is the {(i+j-1)(i+j-2)/2 + i}-th element read in the sequence.

Examples

			The array begins
11 12 13 14 15 16 17 18 19 110 ...
21 22 23 24 25 26 27 28 29 210 ...
31 32 33 34 35 36 37 38 39 310 ...
41 42 43 44 45 46 47 48 49 410 ...
		

Crossrefs

Programs

  • Mathematica
    a = {}; Do[ a = Append[a, ToExpression[ StringJoin[ ToString[k], ToString[n - k]]]], {n, 2, 13}, {k, 1, n - 1} ]; a
  • Python
    def T(i, j): return int(str(i) + str(j))
    def auptodiag(maxd):
        return [T(i, d+1-i) for d in range(1, maxd+1) for i in range(1, d+1)]
    print(auptodiag(12)) # Michael S. Branicky, Nov 21 2021

Formula

T(i, j) = i*10^A055642(i) + j. - Michael S. Branicky, Nov 21 2021

A095407 Total number of decimal digits of all distinct prime factors of n.

Original entry on oeis.org

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

Views

Author

Labos Elemer, Jun 21 2004

Keywords

Comments

a(n) <= A055642(n) + A001221(n) - 1 since the product of a k digit number and an m digit number has at least k+m-1 digits. - Chai Wah Wu, Nov 03 2019

Examples

			n=22: prime set={2,11}, a[22]=1+2=3.
		

Crossrefs

Programs

  • Mathematica
    Prepend[(Total [ Length[IntegerDigits[#]] & /@ ( #[[1]] & /@ FactorInteger[#])] & /@ Range[2, 105]), 0] (* Zak Seidov, Aug 26 2016 *)
  • PARI
    a(n)=vecsum(apply(p->#Str(p), factor(n)[,1])) \\ Charles R Greathouse IV, Aug 26 2016

A097944 Number of digits in n-th prime.

Original entry on oeis.org

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

Views

Author

Cino Hilliard, Sep 05 2004

Keywords

Comments

For primes p <= n sum(a(n)) -> n/2 and n-> inf.

Examples

			The first 4 primes are 2,3,5,7. These are 1-digit numbers so the first 4 entries in the table are 1's.
		

Crossrefs

Cf. A060417, A068670 (partial sums).

Programs

Formula

a(n) = (log n + log log n)/(log 10) + O(1).
a(n) = A055642(A000040(n)). - Reinhard Zumkeller, Apr 08 2012
a(n) = A068670(n) - A068670(n-1). - M. F. Hasler, Oct 24 2019

A175420 Sequence of numbers after 1st step of iteration defined in A175419.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 0, 1, 8, 27, 64, 125, 216, 343, 512, 729, 0, 1, 16, 81, 256, 625, 1296, 2401, 4096, 6561, 0, 1, 32, 243, 1024, 3125, 7776, 16807, 32768, 59049, 0, 1, 64, 729, 4096, 15625, 46656
Offset: 0

Views

Author

Jaroslav Krizek, May 09 2010

Keywords

Examples

			For n = 33: a(33) = 27 because for the number 33 there are 4 steps of defined iteration: {3^3 = 27}, {7^2 = 49}, {9^4 = 6561}, {((1^6)^5)^6 = 1} and the 1st step of the iteration ends with 27.
		

Crossrefs

Programs

  • Maple
    A175420 := proc(n) local dgs,a,i ; if n = 0 then return 0 ; end if; dgs := convert(n,base,10) ; a := op(1,dgs) ; for i from 2 to nops(dgs) do a := a^ op(i,dgs) ; end do: a ; end proc: seq(A175420(n),n=0..120) ; # R. J. Mathar, May 12 2010
  • Mathematica
    Unprotect[Power]; Power[0, 0] = 1; Protect[Power]; a[0]=0; a[n_]:=If[(len=IntegerLength[n])==1, n, Last[list=IntegerDigits[n]]^Product[Part[Drop[list, -1], i], {i, len-1}]]; Array[a, 67, 0] (* Stefano Spezia, Feb 25 2024 *)
  • PARI
    a(n) = if (n, my(d=digits(n), r=d[#d]); forstep (k=#d-1, 1, -1, r = r^d[k];); r); \\ Michel Marcus, Jan 20 2022

Formula

a(n) = (((D_k^D_(k-1))^D_(k-2))^...)^D_1, where D_k = k-th digit D of number n and k = the number of digits of number n in decimal expansion of n (A055642).

Extensions

More terms from R. J. Mathar, May 12 2010

A349194 a(n) is the product of the sum of the first i digits of n, as i goes from 1 to the total number of digits of n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 36, 42, 48, 54, 60, 66, 72, 78, 84, 90, 49, 56, 63, 70, 77
Offset: 1

Views

Author

Malo David, Nov 10 2021

Keywords

Comments

The only primes in the sequence are 2, 3, 5 and 7. - Bernard Schott, Nov 23 2021

Examples

			For n=256, a(256) = 2*(2+5)*(2+5+6) = 182.
		

Crossrefs

Cf. A055642, A284001 (binary analog), A349190 (fixed points).
Cf. A007953 (sum of digits), A059995 (floor(n/10)).
Cf. A349278 (similar, with the last digits).

Programs

  • Magma
    f:=func; [f(n):n in [1..100]]; // Marius A. Burtea, Nov 23 2021
  • Mathematica
    Table[Product[Sum[Part[IntegerDigits[n],j],{j,i}],{i,Length[IntegerDigits[n]]}],{n,74}] (* Stefano Spezia, Nov 10 2021 *)
  • PARI
    a(n) = my(d=digits(n)); prod(i=1, #d, sum(j=1, i, d[j])); \\ Michel Marcus, Nov 10 2021
    
  • PARI
    first(n)=if(n<9,return([1..n])); my(v=vector(n)); for(i=1,9,v[i]=i); for(i=10,n, v[i]=sumdigits(i)*v[i\10]); v \\ Charles R Greathouse IV, Dec 04 2021
    
  • Python
    from math import prod
    from itertools import accumulate
    def a(n): return prod(accumulate(map(int, str(n))))
    print([a(n) for n in range(1, 100)]) # Michael S. Branicky, Nov 10 2021
    

Formula

For n>10: a(n) = a(A059995(n))*A007953(n) where A059995(n) = floor(n/10).
In particular, for n<100: a(n) = floor(n/10)*A007953(n)
From Bernard Schott, Nov 23 2021: (Start)
a(n) = 1 iff n = 10^k, k >= 0 (A011557).
a(n) = 2 iff n = 10^k + 1, k >= 0 (A000533 \ {1}).
a(n) = 3 iff n = 10^k + 2, k >= 0 (A133384).
a(n) = 5 iff n = 10^k + 4, k >= 0.
a(n) = 7 iff n = 10^k + 6, k >= 0. (End)
From Marius A. Burtea, Nov 23 2021: (Start)
a(A002275(n)) = n! = A000142(n), n >= 1.
a(A090843(n - 1)) = (2*n - 1)!! = A001147(n), n >= 1.
a(A097166(n)) = (3*n - 2)!!! = A007559(n).
a(A093136(n)) = 2^n = A000079(n).
a(A093138(n)) = 3^n = A000244(n). (End)
Previous Showing 101-110 of 506 results. Next