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-4 of 4 results.

A103208 Numbers k such that 3 divides prime(1) + ... + prime(k).

Original entry on oeis.org

10, 16, 18, 20, 24, 26, 28, 30, 32, 34, 36, 40, 42, 44, 46, 52, 54, 57, 68, 70, 74, 76, 78, 80, 82, 84, 86, 88, 90, 97, 99, 103, 105, 107, 111, 113, 119, 121, 123, 125, 127, 129, 134, 136, 138, 161, 163, 166, 169, 175, 177, 179, 185, 187, 195, 197, 199, 203, 205, 207, 211, 213
Offset: 1

Views

Author

Robert G. Wilson v, Mar 19 2005

Keywords

Comments

Also, numbers k such that 3 divides the concatenation of the first k primes (see A019518).
The first comment and the description are true whenever the number of primes congruent to 1 mod 6 exceeds the number of primes congruent to 5 mod 6 and the difference is congruent to 1 mod 3 or the number of primes congruent to 5 mod 6 exceeds the number of primes congruent to 1 mod 6 and the difference is congruent to 2 mod 3. - Roderick MacPhee, Oct 30 2015

Crossrefs

Programs

  • Maple
    s1:=[2]; M:=1000; for n from 2 to M do s1:=[op(s1),s1[n-1]+ithprime(n)]; od: s1;
    f:=proc(k) global M,s1; local t1,n; t1:=[]; for n from 1 to M do if s1[n] mod k = 0 then t1:=[op(t1),n]; fi; od: t1; end; f(3);
  • Mathematica
    f[n_] := FromDigits[ Flatten[ Table[ IntegerDigits[ Prime[i]], {i, n}]]]; Select[ Range[ 206], Mod[f[ # ], 3] == 0 &]
    Flatten[Position[Accumulate[Prime[Range[250]]],?(Divisible[#,3]&)]] (* _Harvey P. Dale, Jan 14 2016 *)
  • PARI
    a=0;b=0;for(x=3,1000,if(prime(x)%6==1,a+=1,b+=1);if((a-b)%3==1 || (b-a)%3==2,print1(x","))) \\ Roderick MacPhee, Oct 30 2015
    
  • PARI
    lista(nn) = { s=0; for(k=1, nn, s += prime(k); if(s % 3 == 0, print1(k, ", ")););} \\ Altug Alkan, Dec 04 2015

Extensions

Entry revised by N. J. A. Sloane, Nov 09 2005

A241845 a(1)=1; for n >1 a(n) is the smallest prime divisor of the number obtained from concatenation of 1 and the first n-1 composites.

Original entry on oeis.org

1, 2, 2, 2, 37, 2, 2, 2, 5, 2, 2, 2, 27793, 2, 2, 3, 2, 29, 2, 2, 2, 19, 2, 5, 2, 2, 1468910121415161820212224252627283032333435363839, 2, 2, 2, 5, 2, 2, 3, 2, 127, 2, 2, 5, 2, 3, 2, 2, 2, 3, 2, 3, 2, 2
Offset: 1

Views

Author

Paolo P. Lava, Apr 30 2014

Keywords

Comments

a(1)=1, and for n > 1 a(n) is the smallest prime divisor of the number obtained from the concatenation of A018252(j), j=1, ..., n. - Wolfdieter Lang, May 07 2014

Examples

			1 U 4 = 14 and its divisors are 1, 2, 7, 14. Then a(2) = 2.
14 U 6 = 146 and its divisors are 1, 2, 73, 146. Then a(3) = 2.
146 U 8 = 1468 and its divisors are 1, 2, 4, 734, 367, 1468. Then a(4) = 2.
1468 U 9 = 14689 and its divisors are 1, 37, 397, 14689. Then a(5) = 37. Etc.
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    T:=proc(t) local x, y; x:=t; y:=0; while x>0 do x:=trunc(x/10); y:=y+1; od; end:
    P:=proc(q) local a,b,n; b:=1; print(1); for n from 2 to q do if not isprime(n) then b:=n+b*10^T(n); a:=sort([op(divisors(b))]); print(a[2]);
    fi; od; end: P(10^6); # Paolo P. Lava, Apr 30 2014
  • Mathematica
    Module[{nn=70,cmps},cmps=Select[Range[nn],CompositeQ];Join[ {1},SelectFirst[ Divisors[#],PrimeQ]&/@FromDigits/@Table[ Join[ {1},Flatten[ IntegerDigits/@Take[cmps,n]]],{n,Length[cmps]}]]] (* Harvey P. Dale, Jul 27 2021 *)

Extensions

More terms from Jinyuan Wang, Jun 27 2020

A109837 Smallest prime factor of the reverse concatenation of the first n odd numbers.

Original entry on oeis.org

31, 3, 17, 7, 3, 1579, 17, 3, 2677, 131, 3, 54049423, 47, 3, 487, 25541, 3, 7, 211, 3, 31, 622639, 3, 498508631, 7, 3, 1259, 193, 3, 7669, 16229, 3, 13, 887377, 3, 737169676563615957555351494745434139373533312927252321191715131197531
Offset: 2

Views

Author

Zak Seidov, Jul 04 2005

Keywords

Comments

Sequence starts with offset 2 since A038395(1)=1 has no prime factor. - M. F. Hasler
Starting with 2nd term each 3rd term is a(3m)=3.
Sequence A089922={3,73,123,817,...} lists the largest odd number (2n-1) used in the terms a(n) which are primes or probable primes.

Examples

			n=6: a(6)=1579 because 131197531=1579*83089.
		

Crossrefs

Programs

  • Mathematica
    s=1;Do[news=FromDigits[Flatten[{IntegerDigits[n], IntegerDigits[s]}]];fi=FactorInteger[news][[1, 1]];Print[fi];s=news, {n, 3, 70, 2}]
  • PARI
    t=1; for( n=2,99, print1( factor( eval( t=Str( 2*n-1,t)))[1,1],", ")) \\ M. F. Hasler, Apr 13 2008

Formula

a(n) = A020639(A038395(n)). - R. J. Mathar, Sep 16 2007

Extensions

More terms from R. J. Mathar, Sep 16 2007
Edited by M. F. Hasler, Apr 14 2008
Edited by T. D. Noe, Oct 30 2008

A138965 Least prime factor of concatenation of first n odd numbers.

Original entry on oeis.org

1, 13, 3, 23, 37, 3, 11617, 5, 3, 135791113151719, 29, 3, 5, 11, 3, 135791113151719212325272931, 17, 3, 7, 13, 3, 131, 5, 3, 11, 25471443030907588399109, 3, 5, 7, 3, 181, 41, 3, 135791113151719212325272931333537394143454749515355575961636567, 19, 3, 40351, 5, 3, 7, 11, 3, 5, 57041, 3, 351269, 11, 3, 135791113151719212325272931333537394143454749515355575961636567697173757779818385878991939597
Offset: 1

Views

Author

M. F. Hasler, Apr 14 2008

Keywords

Crossrefs

Programs

  • PARI
    t=1; for( n=2,99, print1( factor( eval( t=Str( t,2*n-1 )))[1,1], ", "))

Formula

A138965(n) = A020639(A019519(n)) (= 3 if n = 0 (mod 3)).
Showing 1-4 of 4 results.