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 21 results. Next

A093521 Runs of 1's of lengths 1, prime(1), prime(2), prime(3), ... separated by 0's.

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0
Offset: 1

Views

Author

Robert G. Wilson v, Mar 29 2004

Keywords

Comments

Carl Sagan's "Contact" sequence.
Zeros occur at positions given by 1+A110895(k). - Antti Karttunen, Nov 08 2018

References

  • W. A. Dembski and J. M. Kushiner, Signs of Intelligence, Baker Book House Co., Grand Rapids, MI, p30-31, 2001,
  • Carl Sagan, Contact, Simon and Schuster, Chapter 4 "Prime Numbers," pp. 68-82, NY, 1985.

Crossrefs

Programs

  • Mathematica
    a = Table[1, {100}]; Do[ a[[Sum[Prime[i], {i, n}] + n]] = 0, {n, 1, 8}]; a
  • PARI
    up_to = 111;
    A093521list(up_to) = { my(v=vector(up_to), i=2, j); v[1] = 1; v[2] = 0; forprime(p=2, oo, j=p; while(j, if(i==up_to, return(v), i++; v[i] = 1; j--)); if(i==up_to, return(v), i++; v[i] = 0)); };
    v093521 = A093521list(up_to);
    A093521(n) = v093521[n];

Extensions

Data section extended up to n=111 by Antti Karttunen, Nov 08 2018

A179005 Indices of nonprime repunits: nonnegative numbers n such that 11...111 = (10^n - 1)/9 is composite.

Original entry on oeis.org

0, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69
Offset: 1

Views

Author

Andrew McFarland, Jan 03 2011

Keywords

Comments

The complement of A004023 in the set of nonnegative integers.

Examples

			3 appears because the 3-digit repunit 111 is composite (37*3).
4 appears because the 4-digit repunit 1111 is composite (101*11).
		

Crossrefs

Complement of A004023. Cf. A002275, A004022, A031974, A259102.

Programs

  • PARI
    isok(n) = !isprime((10^n - 1)/9); \\ Michel Marcus, Sep 05 2013

A259102 Composite repunits with a prime number of 1's.

Original entry on oeis.org

111, 11111, 1111111, 11111111111, 1111111111111, 11111111111111111, 11111111111111111111111111111, 1111111111111111111111111111111, 1111111111111111111111111111111111111, 11111111111111111111111111111111111111111, 1111111111111111111111111111111111111111111
Offset: 1

Views

Author

N. J. A. Sloane, Jun 23 2015

Keywords

Crossrefs

Programs

  • Maple
    f:=n->(10^n-1)/9; [f(3),f(5),f(7),f(11),f(13),f(17),f(29),f(31),f(37),f(41),f(43),f(47)];  # cf. A004023
    # second Maple program:
    r:= n-> (10^n-1)/9:
    b:= proc(n) option remember; local p;
          p:=`if`(n=1, 1, b(n-1));
          do p:= nextprime(p);
             if not isprime(r(p)) then return p fi
          od
        end:
    a:= n-> r(b(n)):
    seq(a(n), n=1..15);  # Alois P. Heinz, Jun 25 2015

A323060 a(n) = R_(prime(n)#) / Product_{j=1..n} R_(prime(j)), where prime(n)# is the n-th primorial number A002110(n) and R_k = (10^k - 1)/9.

Original entry on oeis.org

1, 91, 8190090090909099099181
Offset: 1

Views

Author

Patrick A. Thomas, Jan 19 2019

Keywords

Comments

a(4) has 196 digits.
The numbers R_k = 1, 11, 111, ... are sometimes called "Rep-units" or "repunits". The octal versions of a(1) through a(4) may be obtained from the decimal versions by replacing each 6 with a 4, each 7 with a 5, each 8 with a 6, and each 9 with a 7. Similar relations exist for other bases.

Examples

			R_30 / (11*111*11111) = 8190090090909099099181.
		

References

  • Author?, "The Ultimate Number Series Challenge", Vidya, Oct 1988, p. 9.

Crossrefs

Programs

  • Mathematica
    f[n_] := (10^n - 1)/9; Array[f[Product[Prime@ i, {i, #}]]/Product[f@ Prime@ j, {j, #}] &, 3] (* Michael De Vlieger, Jan 19 2019 *)
  • PARI
    R(n) = (10^n-1)/9; \\ A002275
    primo(n) = prod(i=1, n, prime(i)); \\ A002110
    a(n) = R(primo(n))/prod(j=1, n, R(prime(j))); \\ Michel Marcus, Jan 21 2019

A344825 Integers whose digit sum is prime and whose digit product is a perfect square > 0.

Original entry on oeis.org

11, 14, 41, 49, 94, 111, 119, 122, 128, 133, 155, 166, 182, 188, 191, 199, 212, 218, 221, 229, 236, 263, 281, 289, 292, 298, 313, 326, 331, 362, 368, 386, 449, 494, 515, 551, 559, 595, 616, 623, 632, 638, 661, 683, 779, 797, 812, 818, 821, 829, 836, 863, 881
Offset: 1

Views

Author

Ryan Bresler, May 29 2021

Keywords

Comments

If k is in the sequence then all anagrams of k are in the sequence. - David A. Corneth, May 29 2021
Trivially, this sequence has infinite elements. A031974 is an infinite sequence that is found in this sequence - Ryan Bresler, May 30 2021

Examples

			11 is a term because its digit sum is 2 (prime) and its digit product is 1 (perfect square > 0).
		

Crossrefs

Intersection of A028834 and A050626.
Subsequence of A052382.
A031974 is a subsequence of this sequence.

Programs

  • Maple
    q:= n-> (l-> not 0 in l and isprime(add(i, i=l)) and
             issqr(mul(i, i=l)))(convert(n, base, 10)):
    select(q, [$0..999])[];  # Alois P. Heinz, May 29 2021
  • Python
    from math import prod
    from sympy import isprime, integer_nthroot
    def ok(n):
      d = list(map(int, str(n)))
      return 0 not in d and isprime(sum(d)) and integer_nthroot(prod(d), 2)[1]
    print(list(filter(ok, range(1000)))) # Michael S. Branicky, May 29 2021

A097708 Sum of prime-length repunits: Sum_{k=1..n} r(prime(k)), where r()=A002275.

Original entry on oeis.org

0, 11, 122, 11233, 1122344, 11112233455, 1122223344566, 11112233334455677, 1122223344445566788, 11112233334455556677899, 11111122223344445566667789010, 1122222233334455556677778900121
Offset: 0

Views

Author

Jason Earls, Aug 21 2004

Keywords

Examples

			a(3)=11233 because 11 + 111 + 11111 = 11233.
		

Crossrefs

Cf. A097709.
Partial sums of A031974.

Programs

  • PARI
    a(n) = sum(k=1, n, (10^prime(k)-1)/9); \\ Michel Marcus, Jul 17 2022

A178388 Concatenation of the first n primes written in base 3.

Original entry on oeis.org

2, 210, 21012, 2101221, 2101221102, 2101221102111, 2101221102111122, 2101221102111122201, 2101221102111122201212, 21012211021111222012121002, 210122110211112220121210021011, 2101221102111122201212100210111101
Offset: 1

Views

Author

Jonathan Vos Post, May 26 2010

Keywords

Examples

			a(4) = Concatenate[prime(1) base 3, prime(2) base 3, prime(3) base 3, prime(3) base 3] = Concatenate[2 base 3, 3 base 3, 5 base 3, 7 base 3] = Concatenate[2, 10, 12, 21] = 2101221.
		

Crossrefs

Programs

  • Mathematica
    Module[{nn=15,p3},p3=IntegerDigits[Prime[Range[nn]],3];Table[FromDigits[Flatten[ Take[p3,n]]],{n,nn}]] (* Harvey P. Dale, Aug 25 2022 *)
  • PARI
    v = 0; for (n=1, 12, d = digits(prime(n), 3); v = v*10^#d + fromdigits(d); print1 (v ", ")) \\ Rémy Sigrist, Aug 07 2017

Extensions

Edited by N. J. A. Sloane, Jul 02 2017

A090103 n written in base equal to the number of distinct prime factors of n and a(1)=0.

Original entry on oeis.org

0, 11, 111, 1111, 11111, 110, 1111111, 11111111, 111111111, 1010, 11111111111, 1100, 1111111111111, 1110, 1111, 1111111111111111, 11111111111111111, 10010, 1111111111111111111, 10100, 10101, 10110, 11111111111111111111111, 11000
Offset: 1

Views

Author

Labos Elemer, Dec 16 2003

Keywords

Comments

All primes p are written in number-system of base one so rather long strings of 11...111 arise.

Examples

			a(6469693230) = 6469693230.
Symbol A to denote "10" first appears at n = 200560490130 = A002110(11).
		

Crossrefs

Cf. A002110, A001221, A031974 (primes in base one).

Programs

  • Mathematica
    tn[x_] := Fold[nd, 0, x]; Do[s=lf[n];If[Equal[s, 1], Print[tn[Table[1, {i, 1, n}]]]]; If[ !Equal[s, 1], Print[tn[IntegerDigits[n, s]]]], {n, 2, 211}]

Formula

n in base A001221(n).

A137287 a(n) is the number 2 written (prime(n)-1)/2 times followed by the digit 1; a(1)=2.

Original entry on oeis.org

2, 21, 221, 2221, 222221, 2222221, 222222221, 2222222221, 222222222221, 222222222222221, 2222222222222221, 2222222222222222221, 222222222222222222221, 2222222222222222222221, 222222222222222222222221, 222222222222222222222222221, 222222222222222222222222222221
Offset: 1

Views

Author

Ctibor O. Zizka, Apr 05 2008

Keywords

Comments

Sum of digits of a(n) = prime(n).

Examples

			prime(7)=17; (17-1)/2=8; a(7) = 222222221, 8*"2" concatenated with "1".
		

Crossrefs

Programs

  • PARI
    a(n) = if (n==1, 2, fromdigits(concat(vector((prime(n)-1)/2, k, 2), 1))); \\ Michel Marcus, Mar 15 2022

Formula

A007953(a(n)) = A000040(n). - Michel Marcus, Mar 15 2022

Extensions

More terms from Michel Marcus, Mar 15 2022

A245359 Largest number k such that d_1^j + d_2^j + … + d_r^j is prime for all j = 1, 2, .. k, or 0 if no such k exists, where d_1, d_2, … d_r are the digits of n. a(n) = -1 if k is infinite.

Original entry on oeis.org

0, 1, 1, 0, 1, 0, 1, 0, 0, 0, -1, 2, 0, 2, 0, 2, 0, 0, 0, 1, 2, 0, 2, 0, 2, 0, 0, 0, 1, 1, 0, 2, 0, 1, 0, 0, 0, 2, 0, 0, 2, 0, 1, 0, 0, 0, 1, 0, 2, 1, 0, 2, 0, 0, 0, 2, 0, 2, 0, 0, 2, 0, 0, 0, 2, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 1, 0, 0, 1, 0, 2
Offset: 1

Views

Author

Derek Orr, Jul 18 2014

Keywords

Comments

If a(n) = K and reorder the digits of n to make a new number, n'. Thus, a(n') = K.

Examples

			1^1 + 2^1 = 3 is prime.
1^2 + 2^2 = 5 is prime.
1^3 + 2^3 = 9 is not prime.
So a(12) and a(21) = 2.
		

Programs

  • PARI
    a(n) = for(k=1,10^3,d=digits(n);if(!ispseudoprime(sum(i=1,#d,d[i]^k)),return(k-1)));return(-1)
    n=1;while(n<100,print1(a(n),", "); n++)

Formula

a(A031974(n)) = -1 for all n.
Previous Showing 11-20 of 21 results. Next