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 10 results.

A285095 Corresponding values of arithmetic means of digits of primes from A069709.

Original entry on oeis.org

2, 3, 5, 7, 1, 2, 4, 5, 2, 5, 4, 7, 4, 5, 8, 8, 1, 2, 4, 4, 2, 1, 2, 4, 5, 4, 4, 4, 5, 2, 5, 2, 4, 4, 4, 5, 4, 5, 4, 4, 4, 5, 7, 1, 5, 2, 2, 4, 4, 5, 4, 4, 2, 4, 5, 4, 5, 5, 4, 5, 4, 5, 4, 5, 5, 4, 5, 4, 5, 5, 5, 1, 2, 2, 4, 4, 5, 2, 2, 4, 4, 5, 4, 4, 5, 4, 5
Offset: 1

Views

Author

Jaroslav Krizek, Apr 16 2017

Keywords

Crossrefs

Cf. A069709 (primes with integer arithmetic mean of digits in base 10).
Sequences of primes such that a(n) = k for k = 1, 2, 4, 5, 7 and 8: A069710 (k = 1), A285096 (k = 2), A285225 (k = 4), A285226 (k = 5), A285227 (k = 7), A285228 (k = 8).

Programs

  • Magma
    [&+Intseq(n) / #Intseq(n): n in [1..100000] | IsPrime(n) and &+Intseq(n) mod #Intseq(n) eq 0];

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

A069711 Squares whose arithmetic mean of digits is an integer (i.e., the sum of digits is a multiple of the number of digits).

Original entry on oeis.org

0, 1, 4, 9, 64, 144, 225, 324, 441, 576, 729, 900, 1681, 3364, 3481, 4624, 7225, 9025, 12769, 14884, 21025, 23104, 24649, 24964, 27556, 30976, 32041, 33856, 36100, 37249, 37636, 44944, 48841, 56644, 63001, 65536, 66049, 70756, 75076, 75625, 80089, 80656, 85264
Offset: 1

Views

Author

Amarnath Murthy, Apr 08 2002

Keywords

Crossrefs

Programs

  • Mathematica
    Do[ If[ IntegerQ[ Apply[ Plus, IntegerDigits[n^2]] / Floor[ Log[10, n^2] + 1]], Print[n^2]], {n, 1, 10^3}]

Extensions

Edited and extended by Robert G. Wilson v, Apr 12 2002
0 prepended as a(1) and a(27)-a(43) from Jon E. Schoenfield, Jun 28 2018

A285096 Primes with integer arithmetic mean of digits = 2 in base 10.

Original entry on oeis.org

2, 13, 31, 1061, 1151, 1223, 1511, 1601, 2141, 2213, 2411, 3023, 3041, 3203, 3221, 4013, 4211, 5003, 5021, 6011, 6101, 7001, 10009, 10243, 10333, 10513, 10531, 10711, 11071, 11161, 11251, 11503, 11701, 12007, 12043, 12241, 12421, 12511, 12601, 13033, 13411
Offset: 1

Views

Author

Jaroslav Krizek, Apr 16 2017

Keywords

Crossrefs

Primes in A061385. Subsequence of A069709.
Sequences of primes such that a(n) = k for k = 1, 2, 4, 5, 7 and 8: A069710 (k = 1), this sequence (k = 2), A285225 (k = 4), A285226 (k = 5), A285227 (k = 7), A285228 (k = 8).

Programs

  • Magma
    [n: n in [1..100000] | IsPrime(n) and &+Intseq(n) mod #Intseq(n) eq 0 and &+Intseq(n) / #Intseq(n) eq 2];
  • Maple
    S:= proc(d,k,flag) option remember;
      if d = 1 then
        if k >= 0 and k <= 9 then return [k]
        else return []
        fi
      fi;
      [seq(op(map(`+`, procname(d-1,k-i,0), i*10^(d-1))),i=flag..min(k,9))]
    end proc:
    seq(op(select(isprime,S(d,2*d,1))),d=1..5);# Robert Israel, Apr 23 2017
  • Mathematica
    Select[Prime[Range[1600]],Mean[IntegerDigits[#]]==2&] (* Harvey P. Dale, Aug 07 2021 *)

A285225 Primes with integer arithmetic mean of digits = 4 in base 10.

Original entry on oeis.org

17, 53, 71, 1069, 1087, 1249, 1429, 1447, 1483, 1609, 1627, 1663, 1753, 1861, 1933, 1951, 2239, 2293, 2347, 2383, 2437, 2473, 2617, 2671, 2707, 2833, 2851, 3049, 3067, 3229, 3319, 3373, 3391, 3463, 3517, 3571, 3607, 3643, 3733, 3823, 3931, 4057, 4093, 4129
Offset: 1

Views

Author

Jaroslav Krizek, Apr 16 2017

Keywords

Crossrefs

Primes in A061387. Subsequence of A069709.
Sequences of primes such that a(n) = k for k = 1, 2, 4, 5, 7 and 8: A069710 (k = 1), A285096 (k = 2), this sequence (k = 4), A285226 (k = 5), A285227 (k = 7), A285228 (k = 8).

Programs

  • Magma
    [n: n in [1..100000] | IsPrime(n) and &+Intseq(n) mod #Intseq(n) eq 0 and &+Intseq(n) / #Intseq(n) eq 4];
  • Mathematica
    Select[Prime[Range[600]],Mean[IntegerDigits[#]]==4&] (* Harvey P. Dale, Jun 11 2024 *)

A285226 Primes with integer arithmetic mean of digits = 5 in base 10.

Original entry on oeis.org

5, 19, 37, 73, 1289, 1487, 1559, 1667, 1847, 1973, 2099, 2297, 2459, 2477, 2549, 2657, 2693, 2729, 2819, 2837, 2909, 2927, 2963, 3089, 3359, 3449, 3467, 3539, 3557, 3593, 3719, 3863, 3881, 3917, 4079, 4259, 4349, 4457, 4493, 4547, 4583, 4637, 4673, 4691, 4817
Offset: 1

Views

Author

Jaroslav Krizek, Apr 19 2017

Keywords

Crossrefs

Primes from A061388. Subsequence of A069709.
Sequences of primes such that a(n) = k for k = 1, 2, 4, 5, 7 and 8: A069710 (k = 1), A285096 (k = 2), A285225 (k = 4), this sequence (k = 5), A285227 (k = 7), A285228 (k = 8).

Programs

  • Magma
    [n: n in [1..100000] | IsPrime(n) and &+Intseq(n) mod #Intseq(n) eq 0 and &+Intseq(n) / #Intseq(n) eq 5];
  • Mathematica
    Select[Prime@ Range@ PrimePi@ 5000, Mean@ IntegerDigits@ # == 5 &] (* Michael De Vlieger, Apr 22 2017 *)

A285227 Primes with integer arithmetic mean of digits = 7 in base 10.

Original entry on oeis.org

7, 59, 1999, 3889, 4789, 4969, 4987, 5689, 5779, 5869, 6679, 6949, 6967, 7489, 7669, 7687, 7759, 7867, 7993, 8389, 8677, 8839, 8893, 8929, 9199, 9397, 9649, 9739, 9829, 9883, 9973, 18899, 19889, 19979, 19997, 28979, 29789, 29879, 35999, 36899, 37799, 37889
Offset: 1

Views

Author

Jaroslav Krizek, Apr 19 2017

Keywords

Crossrefs

Primes from A061424. Subsequence of A069709.
Sequences of primes such that a(n) = k for k = 1, 2, 4, 5, 7 and 8: A069710 (k = 1), A285096 (k = 2), A285225 (k = 4), A285226 (k = 5), this sequence (k = 7), A285228 (k = 8).

Programs

  • Magma
    [n: n in [1..100000] | IsPrime(n) and &+Intseq(n) mod #Intseq(n) eq 0 and &+Intseq(n) / #Intseq(n) eq 7]
    
  • Mathematica
    Select[Prime@ Range@ PrimePi@ 40000, Mean@ IntegerDigits@ # == 7 &] (* Michael De Vlieger, Apr 22 2017 *)
  • Python
    from itertools import count, islice
    from collections import Counter
    from sympy.utilities.iterables import partitions, multiset_permutations
    from sympy import isprime
    def A285227_gen(): # generator of terms
        yield 7
        for l in count(2):
            for i in range(1,10):
                yield from sorted(q for q in (int(str(i)+''.join(map(str,j))) for s,p in partitions(7*l-i,m=l-1,k=9,size=True) for j in multiset_permutations([0]*(l-1-s)+list(Counter(p).elements()))) if isprime(q))
    A285227_list = list(islice(A285227_gen(),30)) # Chai Wah Wu, Nov 29 2023

A285228 Primes with integer arithmetic mean of digits = 8 in base 10.

Original entry on oeis.org

79, 97, 6899, 8699, 8969, 9689, 9887, 49999, 68899, 69997, 77899, 78889, 78979, 79699, 79987, 85999, 88789, 88897, 88969, 89599, 89689, 89779, 89797, 89959, 89977, 94999, 95989, 96799, 96979, 96997, 97789, 97879, 97987, 98689, 98779, 98869, 98887, 99679, 99787
Offset: 1

Views

Author

Jaroslav Krizek, Apr 19 2017

Keywords

Crossrefs

Primes from A061425. Subsequence of A069709.
Sequences of primes such that a(n) = k for k = 1, 2, 4, 5, 7 and 8: A069710 (k = 1), A285096 (k = 2), A285225 (k = 4), A285226 (k = 5), A285227 (k = 7), this sequence (k = 8).

Programs

  • Magma
    [n: n in [1..100000] | IsPrime(n) and &+Intseq(n) mod #Intseq(n) eq 0 and &+Intseq(n) / #Intseq(n) eq 8];
    
  • Mathematica
    Select[Prime@ Range@ PrimePi[10^5], Mean@ IntegerDigits@ # == 8 &] (* Michael De Vlieger, Apr 22 2017 *)
  • Python
    from itertools import count, islice
    from collections import Counter
    from sympy.utilities.iterables import partitions, multiset_permutations
    def A285228_gen(): # generator of terms
        for l in count(2):
            for i in range(1,10):
                yield from sorted(q for q in (int(str(i)+''.join(map(str,j))) for s,p in partitions((l<<3)-i,m=l-1,k=9,size=True) for j in multiset_permutations([0]*(l-1-s)+list(Counter(p).elements()))) if isprime(q))
    A285228_list = list(islice(A285228_gen(),30)) # Chai Wah Wu, Nov 28 2023

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

A329192 Fibonacci numbers with arithmetic mean of digits an integer (sum of digits = a multiple of number of digits).

Original entry on oeis.org

1, 2, 3, 5, 8, 13, 55, 144, 987, 6765, 10946, 9227465, 225851433717, 8944394323791464, 160500643816367088, 83621143489848422977, 59425114757512643212875125, 30960598847965113057878492344, 127127879743834334146972278486287885163
Offset: 1

Views

Author

Keywords

Examples

			55 is a term as the arithmetic mean of digits is an integer: (5+5)/2 = 5.
144 is a term as the arithmetic mean of digits is an integer: (1+4+4)/3 = 3.
6765 is a term as the arithmetic mean of digits is an integer: (6+7+6+5)/4 = 6.
		

Crossrefs

Programs

  • Mathematica
    <
    				

Formula

a(n) = A000045(A164947(n+1)).
Showing 1-10 of 10 results.