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.

User: Enoch Haga

Enoch Haga's wiki page.

Enoch Haga has authored 487 sequences. Here are the ten most recent ones:

A161191 Primes in A161190.

Original entry on oeis.org

281, 857, 1433, 2459, 1163, 1381, 7213, 4729, 2143, 2591, 13411, 8783, 2971, 9311, 9733, 9931, 11423, 12037, 4357, 4703, 4831, 4933, 27743, 5903, 6011, 30259, 6491, 6827, 20879, 35059, 7151, 7759, 8219, 25321, 8501, 25849, 8863, 9067, 9227, 29641
Offset: 1

Author

Enoch Haga, Jun 06 2009

Keywords

Examples

			a(1)=281 because 281 is prime and also the sum of the primes in the 4 diagonals: 11+31+37+43+47+53+59 = 281
		

Crossrefs

Formula

A161190 INTERSECT A000040.

A160244 A104449(n+1)+prime(n), sum of a Lucas and the prime sequence.

Original entry on oeis.org

6, 8, 14, 21, 34, 50, 77, 116, 180, 283, 442, 702, 1117, 1784, 2864, 4611, 7434, 11994, 19375, 31312, 50622, 81869, 132422, 214218, 346565, 560698, 907168, 1467769, 2374836, 3842502, 6217243, 10059636, 16276758, 26336265, 42612896, 68949024
Offset: 1

Author

Enoch Haga, May 05 2009

Keywords

Comments

A104449 could be called L31(n), the Lucas sequence starting with 3,1.

Crossrefs

Programs

  • UBASIC
    10 'Lucas variations (change value of A in line 30 as appropriate) 20 P=1 30 A=2 40 B=1 50 C=A+B:print C;:R=nxtprm(P):print R;:P=R:print C+R 51 if C=prmdiv(C) then print C;"*":U=U+1 52 if C+R=prmdiv(C+R) then print C+R;"#":V=V+1 60 D=B+C:print D;:R=nxtprm(P):print R;:P=R:print D+R 61 if D=prmdiv(D) then print D;"*":U=U+1 62 if D+R=prmdiv(D+R) then print D+R;"#":V=V+1 63 print U;V 70 stop 80 A=C:B=D:goto 50

Formula

a(n) = A000285(n)+A000040(n).

Extensions

Edited by R. J. Mathar, May 12 2009

A160669 Smallest prime divisor of A160668(n).

Original entry on oeis.org

2, 7, 5, 3, 89, 3, 83, 3, 7, 71, 3, 3, 59, 3, 53, 47, 41, 3, 3, 29, 3, 3, 17, 11, 3, 29, 3, 19, 3, 587, 3, 11, 863, 3, 23, 3, 3, 3, 7, 827, 821, 3, 809, 3, 11, 3, 3, 3, 773, 3, 13, 761, 3, 7, 743, 11, 17, 3, 3, 719, 3, 7, 3, 13, 3, 683, 3, 3, 653, 3, 647, 641, 3, 3, 3, 617, 13, 3, 599
Offset: 1

Author

Enoch Haga, May 23 2009

Keywords

Examples

			a(1)=2 because in A160668 a(1)=8, so the first prime divisor is 2.
		

Crossrefs

Programs

  • UBASIC
    10 'recipseq, Enoch Haga, May 22 2009 20 N=3:print N:C=2 30 A=3:S=sqrt(N) 40 B=N/A 50 if A*B=int(N) then 70 60 A=A+2:if A
    				

A177013 a(n) is the smallest number m such that all the n numbers 1!*m-1, 2!*m-1, ..., n!*m-1 are prime.

Original entry on oeis.org

3, 3, 3, 3, 3, 1500, 1500, 154770, 1656252, 3240034842
Offset: 1

Author

Enoch Haga and Farideh Firoozbakht, May 20 2010

Keywords

Examples

			a(5)=3 because all five numbers 1!*3-1, 2!*3-1, 3!*3-1, 4!*3-1 and 5!*3-1 are prime and 3 is the smallest such number.
The corresponding primes are:
n=1:  2;
n=2:  2, 5;
n=3:  2, 5, 17;
n=4:  2, 5, 17, 71;
n=5:  2, 5, 17, 71, 359;
n=6:  1499, 2999, 8999, 35999, 179999, 1079999;
n=7:  1499, 2999, 8999, 35999, 179999, 1079999, 7559999;
n=8:  154769, 309539, 928619, 3714479, 18572399, 111434399, 780040799, 6240326399;
...
		

Crossrefs

Cf. A177014.

Programs

  • PARI
    okm(m, n) = {for (k=1, n, if (! isprime(k!*m-1), return (0));); return (1);}
    a(n) = {m = 1; while(! okm(m, n), m++); m;} \\ Michel Marcus, Jun 08 2014

A177014 a(n) is the smallest number m such that all the n numbers 1!*m+1, 2!*m+1, ..., n!*m+1 are prime.

Original entry on oeis.org

1, 1, 1, 18, 18, 8628, 748668, 2506980, 228698250, 228698250
Offset: 1

Author

Enoch Haga and Farideh Firoozbakht, May 20 2010

Keywords

Examples

			a(5)=18 because each of the five numbers 1!*18+1, 2!*18+1, 3!*18+1, 4!*18+1 and 5!*18+1 is prime, and 18 is the smallest such number.
The corresponding primes are:
n=1:  2;
n=2:  2, 3;
n=3:  2, 3, 7;
n=4:  19, 37, 109, 433;
n=5:  19, 37, 109, 433, 2161;
n=6:  8629, 17257, 51769, 207073, 1035361, 6212161;
n=7:  748669, 1497337, 4492009, 17968033, 89840161, 539040961, 3773286721;
  ...
		

Crossrefs

Cf. A177013.

Programs

  • PARI
    okm(m, n) = {for (k=1, n, if (! isprime(k!*m+1), return (0));); return (1);}
    a(n) = {m = 1; while(! okm(m, n), m++); m;} \\ Michel Marcus, Jun 08 2014

Extensions

a(10) corrected by Jon E. Schoenfield, Mar 07 2018

A159581 First divisors at which integral quotients occur consecutively in A116536 (and associated with A159580).

Original entry on oeis.org

2747, 6601, 75130, 133386, 148827, 208385, 255445, 799846, 814006, 890299, 993730, 1037571, 1049698, 1382738, 1723170, 1869711, 2168747, 2530165, 2569285, 2615298, 2838135, 2963531, 3020151, 3434151, 3510885, 3627674, 3706710, 3941521, 3999326, 4434411, 4700809, 5887533, 6133305
Offset: 1

Author

Enoch Haga, Apr 16 2009

Keywords

Examples

			The first run of consecutive integers in A051838 is A051838(6)=38 and A051838(7)=39, therefore a(1) = A140763(6)= 2747.
The second run of consecutive integers in A051838 is A051838(13)=56, A051838(14)= 57, A051838(15)=58, therefore a(2) = A140763(13) = 6601.
		

Crossrefs

Extensions

Recomputed by R. J. Mathar, Aug 28 2018

A159580 Integral quotients occur consecutively this many times (in sequence associated with A051838 and A116536).

Original entry on oeis.org

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

Author

Enoch Haga, Apr 16 2009

Keywords

Examples

			a(1)=2 because the 1st subsequence (38,39) of consecutive integers has run length 2.
a(2)=3 because the 2nd subsequence is (56,57,58) which has run length 3.
a(3)=2 because the 3rd subsequence is (167,168) which has run length 2.
		

Crossrefs

Extensions

Recomputed based on b-file of A051838. - R. J. Mathar, Aug 28 2018

A161551 The smallest composite number larger than the n-th composite number, which has a sum of digits equal to the n-th composite number.

Original entry on oeis.org

22, 15, 26, 18, 28, 39, 68, 69, 88, 99, 299, 399, 589, 699, 799, 899, 999, 2899, 3999, 5999, 6999, 7999, 9899, 9999, 29999, 39999, 58999, 69999, 89999, 99999, 299899, 399999, 499999, 689999, 699999, 889999, 999999, 1999999, 3899999, 3999999
Offset: 1

Author

Enoch Haga, Jun 13 2009

Keywords

Comments

Variant of A073866, where the requirement that a(n) > A002808(n) is dropped.

Examples

			The first composite is 4, and the first sum of digits is 13, but since that is prime, we go to the next, 22, which being composite is a(1).
		

Crossrefs

Programs

  • Maple
    A161551 := proc(n)
        for j from n+1 do
            if digsum(A002808(j)) = A002808(n) then
                return A002808(j) ;
            end if;
        end do:
    end proc:
    seq(A161551(n),n=1..30) ; # R. J. Mathar, Dec 06 2011
  • UBASIC
    10 'compsdig, Enoch Haga, Jun 12 2009
    20 N=1
    30 Q=str(N)
    40 L=len(Q)
    50 for X=1 to L
    60 M=str(mid(Q,X,1)): Z=Z+val(mid(Q,X,1))
    70 next X
    80 if Z=56 and Z<>prmdiv(Z) and N<>prmdiv(N) then print N: stop
    90 Z=0: N=N+1: goto 30

Formula

min{c in A002808, c> A002808(n): A007953(c) = A002808(n)}. - R. J. Mathar, Dec 06 2011

A161561 The smallest number larger than n with digital sum equal to n.

Original entry on oeis.org

10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 29, 39, 49, 59, 69, 79, 89, 99, 199, 299, 399, 499, 599, 699, 799, 899, 999, 1999, 2999, 3999, 4999, 5999, 6999, 7999, 8999, 9999, 19999, 29999, 39999, 49999, 59999, 69999, 79999, 89999, 99999, 199999, 299999, 399999
Offset: 1

Author

Enoch Haga, Jun 13 2009

Keywords

Examples

			a(4)=13 because the sums of digits of the candidates 5 to 12 are all different from n=4, and 13 is the first candidate with sum 1+3 = n = 4.
		

Crossrefs

Programs

  • Mathematica
    dsn[n_]:=Module[{k=n+1},While[Total[IntegerDigits[k]]!=n,k++];k]; Array[ dsn,50] (* Harvey P. Dale, Oct 24 2020 *)
  • PARI
    a(n) = my(m = n+1); while(sumdigits(m) != n, m++); m; \\ Michel Marcus, Jun 08 2014

Formula

a(n) = min{k>n: A007953(k) = n}.

Extensions

More precise definition from R. J. Mathar, Aug 30 2010

A161190 Sums of prime points found in four grids in each corner of a square.

Original entry on oeis.org

281, 414, 857, 942, 1124, 2569, 1295, 1433, 1094, 2426, 2730, 3000, 2459, 2575, 1818, 4991, 5331, 3363, 1163, 5006, 5226, 1381, 7213, 7493, 4729, 8217, 3456, 3546, 3684, 5615, 7834, 8090, 6243, 2143, 8862, 11407, 9396, 12019, 4906, 7631, 2591, 13411
Offset: 1

Author

Enoch Haga, Jun 06 2009, Jun 24 2009, Jun 27 2009

Keywords

Comments

When the points are marked on drawn lines the concavity is apparent.
The lines are indicated with capital letters A through G (see Fig. 6 in Link)
- A
B 1 7 12 16 19 21
C 2 8 13 17 20
D 3 9 14 18
E 4 10 15
F 5 11
G 6
Reading diagonally across the bottom of the first of 4 diagonals:
6,11,15,18,20,21. The next 3 diagonals are formed by adding 1 to 21, e.g.,
22,27,31,34,36,37
38,43,47,50,52,53
54,59,63,66,68,69. This grid is numbered 1, and the next, 2, starts at 70.
Each numbered set of 4 grids fills the corners of a square delineating and surrounding a circle suggested by the 24 numbers above on its circumference.

Examples

			a(1)=281 because that is the sum of the prime points in the first set of 4 lower diagonals in the first 4 corner grids: (11+31+37+43+47+53+59=281).
		

Crossrefs

Programs

  • UBASIC
    10 'rotate points, Enoch Haga, Jun 05 2009
    20 F=5
    30 A=F+1:print A;:if A=prmdiv(A) then S=S+B:print "*";
    40 B=A+5:print B;:if B=prmdiv(B) then S=S+B:print "*";
    50 C=B+4:print C;:if C=prmdiv(C) then S=S+C:print "*";
    60 D=C+3:print D;:if D=prmdiv(D) then S=S+D:print "*";
    70 E=D+2:print E;:if E=prmdiv(E) then S=S+E:print "*";
    80 F=E+1:print F;:if F=prmdiv(F) then S=S+F:print "*";
    90 R=R+1:if R=4 and S=prmdiv(S) then print S;"*";
    100 if R=4 then print R;S;:T=T+1:print T:R=0:S=0
    110 stop:goto 30

Extensions

Partially edited by Jon E. Schoenfield, Feb 26 2013