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.

Showing 1-10 of 12 results. Next

A069710 Primes with arithmetic mean of digits = 1 (sum of digits = number of digits).

Original entry on oeis.org

11, 1021, 1201, 2011, 3001, 10103, 10211, 10301, 11003, 12011, 12101, 13001, 20021, 20201, 21011, 21101, 30011, 1000033, 1000213, 1000231, 1000303, 1001023, 1001041, 1001311, 1001401, 1002121, 1003003, 1003111, 1003201, 1010131
Offset: 1

Views

Author

Amarnath Murthy, Apr 08 2002

Keywords

Comments

The sum of the digits of a prime > 3 cannot be a multiple of 3, hence no prime with 3*k digits can be here. - David Radcliffe, May 05 2015
Subsequence of primes of A061384. - Michel Marcus, May 05 2015

Crossrefs

Programs

  • Maple
    F:= proc(d,s) option remember;
      local t,r;
      if d = 1 then
        if s >= 1 and s <= 9 then {s}
        else {}
        fi
      else
        `union`(seq(map(t -> 10*t+r, procname(d-1,s-r)), r=0..min(s,9)))
      fi
    end proc:
    `union`(seq(select(isprime,F(i,i)), i = remove(d -> d mod 3 = 0, [$1..8]));
    # if using Maple 11 or earlier, uncomment the next line
    # sort(convert(%,list)); # Robert Israel, May 05 2015
  • Mathematica
    Do[p = Prime[n]; If[ Apply[ Plus, IntegerDigits[p]] == Floor[ Log[10, p] + 1], Print[p]], {n, 1, 10^5}]
  • Python
    from itertools import count, islice
    from collections import Counter
    from sympy.utilities.iterables import partitions, multiset_permutations
    from sympy import isprime
    def A069710_gen(): # generator of terms
        for l in count(1):
            for i in range(1,min(9,l)+1):
                yield from sorted(q for q in (int(str(i)+''.join(map(str,j))) for s,p in partitions(l-i,k=9,size=True) for j in multiset_permutations([0]*(l-1-s)+list(Counter(p).elements()))) if isprime(q))
    A069710_list = list(islice(A069710_gen(),30)) # Chai Wah Wu, Nov 28 2023

Extensions

Edited and extended by Robert G. Wilson v, Apr 12 2002

A069709 Primes with arithmetic mean of digits an integer (sum of digits = a multiple of number of digits).

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 31, 37, 53, 59, 71, 73, 79, 97, 1021, 1061, 1069, 1087, 1151, 1201, 1223, 1249, 1289, 1429, 1447, 1483, 1487, 1511, 1559, 1601, 1609, 1627, 1663, 1667, 1753, 1847, 1861, 1933, 1951, 1973, 1999, 2011, 2099, 2141, 2213, 2239, 2293
Offset: 1

Views

Author

Amarnath Murthy, Apr 08 2002

Keywords

Crossrefs

Programs

  • Mathematica
    Do[p = Prime[n]; If[ IntegerQ[ Apply[ Plus, IntegerDigits[p]] / Floor[ Log[10, p] + 1]], Print[p]], {n, 1, 10^3}]
    Select[Prime[Range[400]],IntegerQ[Mean[IntegerDigits[#]]]&] (* Harvey P. Dale, Jan 29 2012 *)

Extensions

Edited and extended by Robert G. Wilson v, Apr 12 2002

A316480 Table read by rows: T(n,k), 0 <= k <= 9, is the number of n-digit squares whose average digit is exactly k.

Original entry on oeis.org

1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 21, 0, 0, 1, 0, 0, 0, 0, 57, 0, 0, 42, 0, 0, 0, 0, 2, 0, 0, 192, 0, 0, 14, 0, 0, 0, 0, 52, 0, 0, 499, 0, 0, 0, 0, 0, 25, 191, 1281, 2658, 2282, 705, 65, 0, 0
Offset: 1

Views

Author

Jon E. Schoenfield, Jul 04 2018

Keywords

Comments

The only square whose average digit is 0 is the 1-digit number 0^2 = 0.
The only square whose average digit is 9 is the 1-digit number 3^2 = 9.
Suppose m^2 is an n-digit number whose average digit is an integer k, i.e., digitsum(m^2) = n*k. Since digitsum(m^2) mod 9 = 0, 1, 4, or 7 (cf. A004159), it follows that
- if k = 1, 4, or 7, then n mod 9 = 0, 1, 4, or 7;
- if k = 2, 5, or 8, then n mod 9 = 0, 2, 5, or 8;
- if k = 3 or 6, then n mod 9 = 0, 3, or 6.
In this table, each possible combination of a value of k and a value of n mod 9 is identified with an asterisk (*):
.
n mod 9
.
0 1 2 3 4 5 6 7 8
+----------------------------------
1 | * * * *
|
2 | * * * *
|
3 | * * *
|
4 | * * * *
k |
5 | * * * *
|
6 | * * *
|
7 | * * * *
|
8 | * * * *
.
Not surprisingly, among the values k=1..8, the value of k that occurs least frequently as the average digit of a square is 8.

Examples

			Table begins
  n\k| 0   1      2       3        4        5       6     7 8 9
  ---+---------------------------------------------------------
   1 | 1   1      0       0        1        0       0     0 0 1
   2 | 0   0      0       0        0        1       0     0 0 0
   3 | 0   0      0       5        0        0       2     0 0 0
   4 | 0   0      0       0        6        0       0     0 0 0
   5 | 0   0      5       0        0       21       0     0 1 0
   6 | 0   0      0      57        0        0      42     0 0 0
   7 | 0   2      0       0      192        0       0    14 0 0
   8 | 0   0     52       0        0      499       0     0 0 0
   9 | 0  25    191    1281     2658     2282     705    65 0 0
  10 | 0  12      0       0     5308        0       0    93 0 0
  11 | 0   0    548       0        0    13597       0     0 1 0
  12 | 0   0      0   23310        0        0   12871     0 0 0
  13 | 0  77      0       0   143724        0       0   753 0 0
  14 | 0   0   5572       0        0   360720       0     0 1 0
  15 | 0   0      0  449170        0        0  239403     0 0 0
  16 | 0 102      0       0  3990950        0       0  6029 0 0
  17 | 0   0  51977       0        0  9994767       0     0 4 0
  18 | 0 417 157382 8665925 55115308 45351595 4568205 36552 8 0
		

Crossrefs

Cf. A316481-A316488 (Squares whose arithmetic mean of digits is k, for k=1..8).

Programs

  • Mathematica
    Block[{nn = 9, s}, s = MapAt[Prepend[#, 0] &, Map[Mean@ IntegerDigits[#] &, SplitBy[Range[10^(nn/2)]^2, IntegerLength], {2}], 1]; Table[Count[s[[n]], k], {n, nn}, {k, 0, 9}]] // Flatten (* Michael De Vlieger, Jul 06 2018 *)

A069712 Triangular numbers with arithmetic mean of digits = integer (sum of digits = A multiple of the number of digits).

Original entry on oeis.org

1, 3, 6, 15, 28, 55, 66, 91, 105, 120, 153, 171, 210, 231, 276, 300, 351, 378, 435, 465, 528, 561, 630, 666, 741, 780, 861, 903, 990, 1128, 1326, 1830, 2145, 2415, 3081, 5151, 5995, 6105, 7140, 8385, 8646, 9591, 9870, 10153, 11026, 11175, 12246, 12403
Offset: 0

Views

Author

Amarnath Murthy, Apr 08 2002

Keywords

Crossrefs

Programs

  • Mathematica
    Do[ If[ IntegerQ[ Apply[ Plus, IntegerDigits[n(n + 1)/2]] / Floor[ Log[10, n(n + 1)/2] + 1]], Print[n(n + 1)/2]], {n, 1, 10^3}]
    Select[Accumulate[Range[200]],IntegerQ[Mean[IntegerDigits[#]]]&] (* Harvey P. Dale, Jun 17 2017 *)

Extensions

Edited and extended by Robert G. Wilson v, Apr 12 2002

A316481 Squares whose arithmetic mean of digits is 1 (i.e., the sum of digits equals the number of digits).

Original entry on oeis.org

1, 1100401, 2220100, 100040004, 100100025, 100220121, 100400400, 101002500, 102030201, 102212100, 103002201, 104040000, 110250000, 121022001, 121220100, 123210000, 132020100, 144000000, 210221001, 225000000, 310112100, 324000000, 400040001, 400400100
Offset: 1

Views

Author

Jon E. Schoenfield, Jul 04 2018

Keywords

Comments

Each term's number of digits is in A056991 (Numbers with digital root 1, 4, 7, or 9). For every term k in A056991, this sequence contains at least one k-digit term, with the exception of k=4. (See A316480.)

Examples

			1049^2 = 1100401, a 7-digit number whose digit sum is 1+1+0+0+4+0+1 = 7, so 1100401 is a term.
		

Crossrefs

Intersection of A000290 and A061384. - Michel Marcus, Jul 06 2018

A316484 Squares whose arithmetic mean of digits is 4 (i.e., the sum of digits is 4 times the number of digits).

Original entry on oeis.org

4, 1681, 3364, 3481, 4624, 7225, 9025, 1054729, 1069156, 1073296, 1149184, 1168561, 1183744, 1227664, 1263376, 1288225, 1308736, 1329409, 1366561, 1517824, 1522756, 1545049, 1567504, 1585081, 1607824, 1630729, 1635841, 1677025, 1682209, 1705636, 1729225
Offset: 1

Views

Author

Jon E. Schoenfield, Jul 04 2018

Keywords

Comments

Each term's number of digits is in A056991 (Numbers with digital root 1, 4, 7, or 9). For every term k in A056991, this sequence contains at least one k-digit term. (See A316480.)

Examples

			1027^2 + 1054729, a 7-digit number whose digit sum is 1+0+5+4+7+2+9 = 28 = 4*7, so 1054729 is a term.
10044^2 = 100881936, a 9-digit number whose digit sum is 1+0+0+8+8+1+9+3+6 = 36 = 4*9, so 100881936 is a term.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local L;
      L:= convert(n^2,base,10);
      if convert(L,`+`)=4*nops(L) then n^2 fi
    end proc:
    map(f, [$1..2000]); # Robert Israel, Jul 05 2018
  • Mathematica
    Select[Range[1500]^2, Mean[IntegerDigits[#]] == 4 &] (* Giovanni Resta, Jul 05 2018 *)
  • PARI
    isok(n) = (n>0) && issquare(n) && (sumdigits(n) == 4*#digits(n)); \\ Michel Marcus, Jul 05 2018

A316488 Squares whose arithmetic mean of digits is 8 (i.e., the sum of digits is 8 times the number of digits).

Original entry on oeis.org

97969, 88998998929, 97888999968769, 38999699989995889, 79949788888999969, 98987998979757889, 99497897999899876, 498999778899898896, 597998978979699969, 799778987996998689, 896899597989995889, 899984989899599769, 979978999994798769, 989999999787828969
Offset: 1

Views

Author

Jon E. Schoenfield, Jul 04 2018

Keywords

Comments

Each term's number of digits is in A174438 (Numbers that are congruent to {0, 2, 5, 8} mod 9). For every positive term k in A174438, it appears that this sequence contains at least one k-digit term with the exception of k=2, k=8, and k=9. (See A316480.)

Examples

			313^2 = 97969, a 5-digit number whose digit sum is 9+7+9+6+9 = 40 = 8*5, so 97969 is a term.
9949823114^2 = 98998979999888656996, a 20-digit number whose digit sum is 9+8+9+9+8+9+7+9+9+9+9+8+8+8+6+5+6+9+9+6 = 160 = 8*20, so 98998979999888656996 is a term.
		

Crossrefs

Intersection of A000290 and A061425. - Michel Marcus, Jul 06 2018

A316482 Squares whose arithmetic mean of digits is 2 (i.e., the sum of digits is twice the number of digits).

Original entry on oeis.org

21025, 23104, 32041, 36100, 63001, 10125124, 10176100, 10233601, 10530025, 10824100, 11122225, 11303044, 11424400, 12040900, 12103441, 12222016, 12602500, 13315201, 13322500, 14055001, 14600041, 16008001, 16080100, 16810000, 20205025, 20214016, 20611600
Offset: 1

Views

Author

Jon E. Schoenfield, Jul 04 2018

Keywords

Comments

Each term's number of digits is in A174438 (Numbers that are congruent to {0, 2, 5, 8} mod 9). For every positive term k in A174438, this sequence contains at least one k-digit term, with the exception of k=2. (See A316480.)

Examples

			145^2 = 21025, a 5-digit number whose digit sum is 2+1+0+2+5 = 10 = 2*5, so 21025 is a term.
		

Crossrefs

Intersection of A000290 and A061385. - Michel Marcus, Jul 06 2018

A316483 Squares whose arithmetic mean of digits is 3 (i.e., the sum of digits is 3 times the number of digits).

Original entry on oeis.org

144, 225, 324, 441, 900, 108900, 114921, 119025, 125316, 129600, 136161, 140625, 145161, 159201, 161604, 164025, 176400, 184041, 205209, 210681, 213444, 216225, 219024, 221841, 239121, 242064, 245025, 248004, 254016, 291600, 304704, 308025, 311364, 314721
Offset: 1

Views

Author

Jon E. Schoenfield, Jul 04 2018

Keywords

Comments

Each term's number of digits is divisible by 3. (See A316480.)

Examples

			12^2 = 144, a 3-digit number whose digit sum is 1+4+4 = 9 = 3*3, so 144 is a term.
360^2 = 129600, a 6-digit number whose digit sum is 1+2+9+6+0+0 = 18 = 3*6, so 129600 is a term.
		

Crossrefs

Intersection of A000290 and A061386. - Michel Marcus, Jul 06 2018

A316485 Squares whose arithmetic mean of digits is 5 (i.e., the sum of digits is 5 times the number of digits).

Original entry on oeis.org

64, 12769, 14884, 24649, 24964, 27556, 30976, 33856, 37249, 37636, 44944, 48841, 56644, 65536, 66049, 70756, 75076, 75625, 80089, 80656, 85264, 96721, 10778089, 10982596, 11464996, 11498881, 11648569, 11957764, 11992369, 12369289, 12559936, 12687844, 12909649
Offset: 1

Views

Author

Jon E. Schoenfield, Jul 04 2018

Keywords

Comments

Each term's number of digits is in A174438 (Numbers that are congruent to {0, 2, 5, 8} mod 9). For every positive term k in A174438, this sequence contains at least one k-digit term. (See A316480.)

Examples

			8^2 = 64, a 2-digit number whose digit sum is 6+4 = 10 = 5*2, so 64 is a term.
3283^2 = 10778089, an 8-digit number whose digit sum is 1+0+7+7+8+0+8+9 = 40 = 5*8, so 10778089 is a term.
		

Crossrefs

Intersection of A000290 and A061388. - Michel Marcus, Jul 06 2018

Programs

  • Mathematica
    Select[Range[4000]^2,Mean[IntegerDigits[#]]==5&] (* Harvey P. Dale, Sep 10 2022 *)
Showing 1-10 of 12 results. Next