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.

A218072 Product of the nonzero digits (in base 10) of n^2.

Original entry on oeis.org

1, 4, 9, 6, 10, 18, 36, 24, 8, 1, 2, 16, 54, 54, 20, 60, 144, 24, 18, 4, 16, 128, 90, 210, 60, 252, 126, 224, 32, 9, 54, 8, 72, 30, 20, 108, 162, 64, 10, 6, 48, 168, 288, 162, 20, 12, 36, 24, 8, 10, 12, 56, 144, 108, 30, 54, 216, 216, 96, 18, 42, 384, 1458
Offset: 1

Views

Author

Nels Olson, Oct 19 2012

Keywords

Examples

			a(32) = 8 because 32*32 = 1024 and 1*2*4 = 8.
		

Crossrefs

Similar to A053667, which does not exclude zero digits from the product.
Related to A218013.

Programs

  • Mathematica
    Table[Times@@(IntegerDigits[n^2]/.(0->1)),{n,120}] (* Harvey P. Dale, Dec 12 2017 *)
  • PARI
    a(n) = {digs = digits(n^2); prod(i=1, #digs, if (digs[i], digs[i], 1));} \\ Michel Marcus, Aug 12 2013
    
  • PARI
    a(n) = vecprod(select(x->(x>1), digits(n^2))); \\ Michel Marcus, Mar 07 2022

Formula

a(n) = A051801(n^2). - Michel Marcus, Mar 07 2022

A218014 Location of the n-th prime in its Andrica ranking.

Original entry on oeis.org

27, 6, 13, 1, 31, 4, 54, 8, 3, 100, 5, 25, 155, 28, 9, 16, 243, 19, 49, 288, 21, 62, 24, 12, 75, 422, 81, 444, 84, 2, 112, 37, 580, 11, 634, 47, 53, 150, 57, 60, 788, 20, 840, 183, 872, 10, 14, 218, 1029, 228, 80, 1074, 26, 87, 92, 99, 1237, 103, 281, 1319, 29, 15, 314, 1498, 323
Offset: 1

Views

Author

Marek Wolf and Robert G. Wilson v, Oct 18 2012

Keywords

Comments

For each consecutive prime pair p < q, d = sqrt(q) - sqrt(p) is unique. Place d in order from greatest to least and specify p.
Last appearance by prime index: 1, 5, 7, 10, 13, 17, 20, 26, 28, 33, 35, 41, 43, 45, 49, ..., .
Last appearance of a minimum prime by Andrica ranking: 2, 11, 17, 29, 41, 59, 71, 101, 107, 137, 149, 179, ..., .
As expected, this sequence is the lesser of the twin primes beginning with the second term, 11. See A001359.

Examples

			a(1)=27 since the first prime, 2, does not show up in the ranking until the 27th term. See A218013.
a(4)=1 since the fourth prime, 7, has the maximum A_n value, see A218012; i.e., sqrt(p_n)-sqrt(p_n+1) is at a maximum.
		

Crossrefs

Programs

  • Mathematica
    lst = {}; p = 2; q = 3; While[p < 1600000, If[ Sqrt[q] - Sqrt[p] > 1/20, AppendTo[lst, {p, Sqrt[q] - Sqrt[p]}]]; p = q; q = NextPrime[q]]; lsu = First@ Transpose@ Sort[lst, #1[[2]] > #2[[2]] &]; Table[ Position[lsu, p, 1, 1], {p, Prime@ Range@ 65}] // Flatten

A218030 Numbers k equal to half of the product of the nonzero (base-10) digits of k^2.

Original entry on oeis.org

2, 5, 54, 648, 2160, 337169025526136832000, 685506275314921762068267522458966662115416623590907309075726336000000, 46641846972427276691124922228108091690332947069125333309512419901440000000000
Offset: 1

Views

Author

Nels Olson, Oct 18 2012

Keywords

Comments

The first 5 terms of the sequence were found by the author around 1980 using his Commodore PET computer. He found the subsequent terms in 1991 by means of an improved program. The author has always referred to these as the "Faithy numbers" after his mother, Faith, who posed the problem.

Examples

			For n=5, n^2 is 25; the product of the digits of 25 is 2*5 = 10, which is equal to 2*n.
		

Crossrefs

Special case of A218013 where the ratio of the digit-product to the original number is 2. Related to A218072.

Programs

  • Mathematica
    mx = 2^255; L = {};
    p2 = 1; While[p2 < mx, Print["--> 2^", Log[2, p2]];
    p3 = p2; While [p3 < mx,
      p5 = p3; While[p5 < mx,
       n = p5; While[n < mx,
        If[2 n == Times @@ Select[IntegerDigits[n^2], # > 0 &],
         AppendTo[L, n]; Print[n]]; n *= 7]; p5 *= 5]; p3 *= 3];
    p2 *= 2]; Sort[L] (* Giovanni Resta, Oct 19 2012 *)
  • PARI
    is_A218030(n)={my(d=digits(n^2));n*=2;for(i=1,#d,d[i]||next;n%d[i]&return;n\=d[i]);n==1} \\ M. F. Hasler, Oct 19 2012

A218029 Numbers that are equal to the product of the nonzero digits (in base 10) of their square.

Original entry on oeis.org

1, 30240, 60480, 51597803520, 687009790646587541893939200, 2639216811747930700939756830720000000, 399953837788563897626396208106026886244605021117749733129069000654848000000000
Offset: 1

Views

Author

Nels Olson, Oct 18 2012

Keywords

Examples

			For n=30240, n^2 = 914,457,600; the product of the nonzero digits of this square, 9*1*4*4*5*7*6 = 30240 = n.
		

Crossrefs

Special case of A218013 where the ratio of the digit-product to the original number is 1. Related to A218072.
Showing 1-4 of 4 results.