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: Philip Mizzi

Philip Mizzi's wiki page.

Philip Mizzi has authored 27 sequences. Here are the ten most recent ones:

A340164 Rotationally ambigrammatic square numbers with no trailing zeros.

Original entry on oeis.org

0, 1, 9, 16, 81, 169, 196, 961, 1089, 1681, 6889, 9801, 10609, 10816, 11881, 19881, 61009, 69169, 69696, 80089, 90601, 91809, 110889, 160801, 190096, 190969, 198916, 199809, 609961, 660969, 698896, 811801, 896809, 900601, 910116, 919681, 998001, 1006009
Offset: 1

Author

Philip Mizzi, Dec 30 2020

Keywords

Comments

A rotationally ambigrammatic number (A045574) is one that can be rotated by 180 degrees resulting in a readable, most often new number. Such numbers, by definition, can only contain the digits 0, 1, 6, 8, 9.
If the number once rotated happens to be the same number (e.g., 6889) it is a strobogrammatic number. Those present here are the terms of A018848.
Numbers such as 100, which is a square with trailing zeros, have been excluded. Such numbers rotated by 180 degrees would be written with leading zeros. Typically this is not the way we write numbers.
This sequence is infinite as it contains (10^k + 3)^2 and (3*10^k + 1)^2 for any k >= 0 (note also that A004086((10^k + 3)^2) = (3*10^k + 1)^2 when k > 0). - Rémy Sigrist, Dec 30 2020

Crossrefs

Intersection of A045574 and A000290.
Cf. A004086, A339996 (square roots).

Programs

  • Mathematica
    Select[Range[0, 1000], (# == 0 || ! Divisible[#, 10]) && AllTrue[IntegerDigits[#^2], MemberQ[{0, 1, 6, 8, 9}, #1] &] &]^2 (* Amiram Eldar, Dec 30 2020 *)
  • PARI
    isra(n) = (n%10) && (!setminus(Set(Vec(Str(n))), Vec("01689"))) || !n; \\ A045574
    isok(n) = issquare(n) && isra(n); \\ Michel Marcus, Dec 30 2020

Formula

a(n) = A339996(n)^2.

A340054 Prime numbers which can be expressed as the sum of two numbers, one of which is the rotationally ambigrammatic transformation of the other excluding leading zeros.

Original entry on oeis.org

2, 107, 157, 929, 1069, 1567, 10007, 10079, 11657, 11927, 14897, 15667, 15937, 91019, 93529, 93629, 99689, 100207, 100279, 100669, 100699, 104179, 105359, 106297, 106759, 108287, 108649, 108707, 109097, 109267, 109297, 110567, 110597, 111577, 114377, 115777
Offset: 1

Author

Philip Mizzi, Dec 27 2020

Keywords

Examples

			Consider the number 16. Applying a rotationally ambigrammatic transformation gives the number 91. 16 + 91 = 107. A prime. Hence 107 is part of the sequence.
Consider the number 18. Applying a rotationally ambigrammatic transformation gives the number 81. 18 + 81 = 99. Not a prime. Hence 99 is not part of the sequence.
		

Crossrefs

Cf. A045574 (rotationally ambigrammatic numbers), A018848.

A339996 Numbers whose square is rotationally ambigrammatic with no trailing zeros.

Original entry on oeis.org

0, 1, 3, 4, 9, 13, 14, 31, 33, 41, 83, 99, 103, 104, 109, 141, 247, 263, 264, 283, 301, 303, 333, 401, 436, 437, 446, 447, 781, 813, 836, 901, 947, 949, 954, 959, 999, 1003, 1004, 1009, 1053, 1054, 1291, 1349, 1367, 2467, 2486, 2609, 2849, 2949, 2986, 3001
Offset: 1

Author

Philip Mizzi, Dec 25 2020

Keywords

Comments

A rotationally ambigrammatic number (A045574) is one that can be rotated by 180 degrees resulting in a readable, most often new number. Such numbers, by definition, can only contain the digits 0, 1, 6, 8, 9.
If the number once rotated happens to be the same number it is a strobogrammatic number (A000787); such numbers form a subset of the ambigrammatic numbers.
Numbers (such as 10) whose square has trailing zeros have been excluded because the rotation of such a number by 180 degrees would result in a number with leading zeros. Typically this is not the way we write numbers.
The numbers 14 and 31 are interesting numbers in this sequence in that when their square is rotated 180 degrees, the square root results in the other number. I believe this is unique to only these two numbers.

Examples

			13^2 = 169. A rotationally ambigrammatic number. Hence, 13 is a term.
15^2 = 225. Not rotationally ambigrammatic and hence 15 is not a term.
10^2 = 100. This number has trailing zeros, so under this definition of rotationally ambigrammatic, 10 is not a term.
		

Crossrefs

Cf. A045574, A340164 (squares).

Programs

  • Mathematica
    Select[Range[0, 4001], (# == 0 || !Divisible[#, 10]) && AllTrue[IntegerDigits[#^2], MemberQ[{0, 1, 6, 8, 9}, #1] &] &] (* Amiram Eldar, Dec 26 2020 *)
  • PARI
    isra(n) = (n%10) && (!setminus(Set(Vec(Str(n))), Vec("01689"))) || !n; \\ A045574
    isok(n) = isra(n^2); \\ Michel Marcus, Dec 27 2020

Formula

a(n) = sqrt(A340164(n)).

A335739 Numbers k such that the area of an equilateral triangle of side k falls in between twin primes.

Original entry on oeis.org

3, 4, 25, 98, 119, 123, 136, 267, 299, 318, 344, 423, 429, 443, 444, 522, 552, 571, 577, 588, 589, 639, 677, 739, 771, 817, 933, 993, 1115, 1212, 1393, 1503, 1558, 1580, 1629, 1756, 1799, 1852, 1871, 1884, 1991, 2027, 2063, 2197, 2345, 2380, 2583, 2585
Offset: 1

Author

Philip Mizzi, Dec 28 2020

Keywords

Comments

The number 3 is the only value where the area is between twin primes with 3 as one of the twins.

Examples

			An equilateral triangle of side 3 has an area A = (sqrt(3)/4) * 3^2 = 3.89711, which is between 3 and 5, which are twin primes; so 3 is a term.
An equilateral triangle of side 17 has an area A = (sqrt(3)/4) * 17^2 = 125.14 which is between 125 and 127. These are not twin primes; so 17 is not a term.
		

Crossrefs

Programs

  • PARI
    isok(k) = my(A = floor(k^2*sqrt(3)/4)); if (! (A%2), A--); isprime(A) && isprime(A+2); \\ Michel Marcus, Dec 28 2020

A336891 Sequence following Van Eck's sequence unless a prime which was previously encountered is found, in which case, a(n+1) = n - m, where m is the largest possible value such that a(m) is also prime.

Original entry on oeis.org

0, 0, 1, 0, 2, 0, 2, 2, 1, 6, 0, 5, 0, 2, 2, 1, 7, 0, 5, 2, 1, 5, 2, 1, 3, 0, 8, 0, 2, 4, 0, 3, 3, 1, 10, 0, 5, 4, 8, 12, 0, 5, 5, 1, 10, 10, 1, 3, 5, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1
Offset: 1

Author

Philip Mizzi, Aug 07 2020

Keywords

Comments

Van Eck's sequence (A181391) is an integer sequence defined as follows; Let a(0) = 0. For, n >= 0, if there exists an m < n such that a(m) = a(n), take the largest such m and set a(n+1) = n - m, otherwise a(n+1) = 0. This sequence modifies the Van Eck sequence, adding an additional condition in that if a(n) is prime, set a(n+1) = n - m, where m is the largest possible value such that a(m) is also prime.

Examples

			Start with a(1) = 0.
0 has not occurred before, so the rule says a(2) = 0.
Now 0 HAS occurred before, at a(1), 0 is not prime, so a(3) = 1, which is the number of places before a(2) where 0 occurs.
1 has not occurred before, so a(4) = 0.
0 occurred most recently at term a(2) and is not prime, so a(5) = 2.
2 has not occurred before, so a(6) = 0.
0 occurred most recently at term a(4) and is not prime, so a(7) = 2.
2 occurred most recently at term a(5) and 2 IS prime, so a(8) = 2 which is the number of places back where the previous prime occurred.
.. and so on!
		

Crossrefs

Cf. A181391 (Van Eck's sequence).

Programs

  • PARI
    lista(nn) = {my(t, v=vector(nn)); for(n=2, nn-1, if(vecsearch(vecsort(v[1..n-1]), v[n]), t=1; if(isprime(v[n]), while(!isprime(v[n-t]), t++), while(v[n-t]!=v[n], t++)); v[n+1]=t)); v; } \\ Jinyuan Wang, Aug 20 2020

Extensions

More terms from Jinyuan Wang, Aug 07 2020

A328452 Primes p such that p=prime(k), prime(k+1), and prime(k+2) end in the same digit.

Original entry on oeis.org

1627, 3089, 4297, 4831, 6481, 6793, 8543, 11027, 11867, 13421, 13649, 14177, 17509, 17807, 18839, 18859, 20359, 20411, 22501, 22511, 22963, 22973, 24923, 25189, 26449, 26459, 27367, 27541, 28309, 29443, 29453, 31081, 32203, 32381, 34919, 35171, 35281, 36343, 36353, 37087, 37223, 37243, 38923
Offset: 1

Author

Philip Mizzi, Oct 15 2019

Keywords

Examples

			(p,q,r) = (1627,1637,1657), are three primes which are consecutive and end in the same digit. Hence, p=1627 is a member of this sequence.
		

Crossrefs

Programs

  • Magma
    f:=func; a:=[]; for p in PrimesUpTo(40000) do if f(p,1) or f(p,3) or f(p,7) or f(p,9) then Append(~a,p); end if; end for; a; // Marius A. Burtea, Oct 16 2019
    
  • Maple
    q:= 3: r:= 5: count:= 0: R:= NULL:
    while count < 100 do
       p:= q; q:= r; r:= nextprime(r);
       if p-q mod 10 = 0 and q-r mod 10 = 0 then count:= count+1; R:= R, p; fi
    od:
    R; # Robert Israel, May 08 2020
  • Mathematica
    First /@ Select[Partition[Prime@ Range@ 4105, 3, 1], Length@ Union@ Mod[#, 10] == 1 &] (* Giovanni Resta, Oct 16 2019 *)
  • PARI
    isok(p) = {if (isprime(p), my(d = p % 10); my(q = nextprime(p+1), r = nextprime(q+1)); (d == (q % 10)) && (d == (r % 10)););} \\ Michel Marcus, Oct 17 2019

A328197 Smallest prime (p) of six consecutive primes (p,q,r,u,v,w) for which the conic section discriminant (Delta) for general conic section px^2 + qy^2 + rz^2 + 2uyz + 2vxz + 2wxy = 0 is a fourth power.

Original entry on oeis.org

430487, 1288337, 2317097, 3047311, 6045077, 10593617, 11166347, 14122697, 14774537, 16622717, 17905427, 17956637, 18614777, 21677701, 23874467, 24148547, 25109057, 28198187, 31543847, 34953227, 35542667, 35761409, 40321007, 41627671, 41961587, 44536469, 46184627
Offset: 1

Author

Philip Mizzi, Oct 07 2019

Keywords

Comments

Delta = pqr + 2uvw - pu^2 - qv^2 - rw^2 for the general conic section px^2 + qy^2 + rz^2 + 2uyz + 2vxz + 2wxy = 0.

Examples

			For n = 1, (p,q,r,u,v,w) = (430487,430499,430511,430513,430517,430543), Delta = 1296 = 6^4. Hence, 430487 the smallest prime of the six is a member.
		

Crossrefs

Cf. A000040.

Extensions

More terms from Giovanni Resta, Oct 09 2019

A327592 Smallest prime (p) of six consecutive primes (p,q,r,u,v,w) for which the conic section discriminant (Delta) is a perfect square.

Original entry on oeis.org

397, 68219, 87881, 316531, 430487, 440653, 639701, 691813, 732497, 982981, 1145773, 1226683, 1288337, 1291223, 1537751, 1563943, 1756663, 1913803, 2043397, 2134589, 2143391, 2317097, 2366789, 2528833, 3047311, 3107597, 3261523, 3678869, 3884389, 4143397
Offset: 1

Author

Philip Mizzi, Sep 18 2019

Keywords

Comments

Delta = pqr + 2uvw - pu^2 - qv^2 - rw^2 for the general conic section px^2 + qy^2 + rz^2 + 2uyz + 2vxz + 2wxy = 0.
Perfect squares of this form are quite rare, representing approximately 0.0048% of possible Delta values using consecutive prime number coefficients. (First 4 million primes tested.)

Examples

			48 = sqrt(2304) = pqr + 2uvw - pu^2 - qv^2 - rw^2 for (p,q,r,u,v,w) = (440653,440669,440677,440681,440683,440711), which are consecutive primes. Hence, 440653 is a member of the sequence.
		

Crossrefs

Cf. A000040.

Programs

  • Mathematica
    f[{p_, q_, r_, u_, v_, w_}] := p q r + 2 u v w - p u^2 - q v^2 - r w^2; First /@ Select[Partition[ Prime@ Range@ 300000, 6, 1], IntegerQ@ Sqrt@ f@ # &] (* Giovanni Resta, Sep 30 2019 *)
  • PARI
    chk(nn) = {forprime (p=1, nn, my(q = nextprime(p+1), r = nextprime(q+1), u = nextprime(r+1), v = nextprime(u+1), w = nextprime(v+1)); if (issquare(p*q*r + 2*u*v*w - p*u^2 - q*v^2 - r*w^2), print1(p, ", ")););} \\ Michel Marcus, Sep 30 2019

A327378 Smallest prime p in a sequence of six consecutive primes (p,q,r,u,v,w) for which the conic section discriminant Delta < 0 for the general conic section px^2 + qy^2 + rz^2 + 2uyz + 2vxz + 2wxy = 0.

Original entry on oeis.org

863, 1303, 2539, 2953, 3251, 3457, 4007, 4139, 4507, 5209, 5431, 5717, 7229, 7867, 7933, 9323, 9421, 11821, 12011, 12101, 12143, 12907, 12983, 13709, 13859, 14071, 14549, 15661, 16141, 16811, 17977, 18773, 18899, 19069, 19577, 20347, 20533, 21013, 21503, 21599, 22543
Offset: 1

Author

Philip Mizzi, Sep 16 2019

Keywords

Comments

Delta = pqr + 2uvw - pu^2 - qv^2 - rw^2.
Using consecutive primes in the general conic section and computing Delta, the value is most often (~98%) > 0.

Examples

			For (p,q,r,u,v,w) = (2,3,5,7,11,13), Delta = 726 > 0. Hence, p=2 (smallest prime) is not in the sequence.
For (p,q,r,u,v,w) = (863,877,881,883,887,907), Delta = -73164 < 0. Hence, p=863 (smallest prime) is a member of the sequence.
		

Crossrefs

Cf. A000040.

Programs

  • Mathematica
    Select[Partition[Prime@ Range[3000], 6, 1], Function[{p, q, r, u, v, w}, p q r + 2 u v w - p u^2 - q v^2 - r w^2 < 0] @@ # &][[All, 1]] (* Michael De Vlieger, Sep 30 2019 *)
  • PARI
    lista(nn) = {forprime (p=1, nn, q = nextprime(p+1); r = nextprime(q+1); u = nextprime(r+1); v = nextprime(u+1); w = nextprime(v+1); if ((x=p*q*r + 2*u*v*w - p*u^2 - q*v^2 - r*w^2)< 0, print1(p, ", ")););} \\ Michel Marcus, Sep 18 2019

Extensions

More terms from Michel Marcus, Sep 18 2019

A325173 Perfect squares of the form a + b^2 + c^3, where a,b,c are consecutive numbers.

Original entry on oeis.org

9, 144, 1089, 5184, 18225, 51984, 127449, 278784, 558009, 1040400, 1830609, 3069504, 4941729, 7683984, 11594025, 17040384, 24472809, 34433424, 47568609, 64641600, 86545809, 114318864, 149157369, 192432384, 245705625, 310746384, 389549169, 484352064, 597655809, 732243600
Offset: 1

Author

Philip Mizzi, Sep 05 2019

Keywords

Examples

			9 = 0 + 1^2 + 2^3. 0,1,2 are consecutive numbers and 9 is a perfect square. Hence, 9 is a member of the sequence.
18225 = 24 + 25^2 + 26^3. 24,25,26 are consecutive numbers and 18225 is a perfect square. Hence 18225 is a member of the sequence.
		

Crossrefs

Intersection of A000290 and A027620.
Cf. A005563 (the indices n that give these squares), A054602.

Programs

  • PARI
    a(n) = n^2*(2 + n^2)^2 \\ David A. Corneth, Sep 11 2019
    
  • PARI
    Vec(9*x*(1 + x)*(1 + 8*x + 22*x^2 + 8*x^3 + x^4) / (1 - x)^7 + O(x^40)) \\ Colin Barker, Sep 11 2019

Formula

a(n) = A000290(A054602(n)). - Michel Marcus, Sep 05 2019
From Colin Barker, Sep 05 2019: (Start)
G.f.: 9*x*(1 + x)*(1 + 8*x + 22*x^2 + 8*x^3 + x^4) / (1 - x)^7.
a(n) = n^2*(2 + n^2)^2.
a(n) = 7*a(n-1) - 21*a(n-2) + 35*a(n-3) - 35*a(n-4) + 21*a(n-5) - 7*a(n-6) + a(n-7) for n>7.
(End)
E.g.f.: exp(x)*x*(9 + 63*x + 114*x^2 + 69*x^3 + 15*x^4 + x^5). - Conjectured by Stefano Spezia, Sep 05 2019 after Colin Barker
From Chai Wah Wu, Sep 10 2019: (Start)
Above conjectures are true. Proof: k + (k+1)^2 + (k+2)^3 = (k+1)*(k+3)^2 and thus is a perfect square if and only if k+1 = n^2 is a perfect square. This implies that (k+1)*(k+3)^2 = n^2*(n^2+2)^2.
(End)