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

A255005 a(n) = the digit sum of prime(n) + the digit product of prime(n).

Original entry on oeis.org

4, 6, 10, 14, 3, 7, 15, 19, 11, 29, 7, 31, 9, 19, 39, 23, 59, 13, 55, 15, 31, 79, 35, 89, 79, 2, 4, 8, 10, 8, 24, 8, 32, 40, 50, 12, 48, 28, 56, 32, 80, 18, 20, 40, 80, 100, 6, 19, 39, 49, 26, 68, 15, 18, 84, 47, 125, 24, 114, 27, 61, 68, 10, 8, 16, 32, 16
Offset: 1

Views

Author

Vincenzo Librandi, Feb 12 2015

Keywords

Examples

			Prime(5)=11 and (1*1) + (1+1) = 3 so a(5) = 3.
Prime(10)=29 and (2*9) + (2+9) = 29 so a(10) = 29.
		

Crossrefs

Subsequence of A061762.

Programs

  • Magma
    [&*Intseq(NthPrime(n))+&+Intseq(NthPrime(n)): n in [1..80]];
  • Mathematica
    Table[Plus @@ IntegerDigits[Prime[n]] + Times @@ IntegerDigits[Prime[n]], {n, 80}] (* Bruno Berselli, Feb 12 2015 *)
    dsdp[n_]:=Module[{idpn=IntegerDigits[Prime[n]]},Total[idpn]+Times@@idpn]; dsdp/@Range[70] (* Harvey P. Dale, Mar 05 2017 *)

Formula

a(n) = A007605(n) + A053666(n).

A260523 Numbers n such that (sum of digits of n) + (product of digits of n) is semiprime.

Original entry on oeis.org

2, 3, 5, 7, 14, 17, 24, 28, 33, 38, 39, 40, 41, 42, 46, 47, 49, 55, 60, 64, 67, 68, 69, 71, 74, 76, 82, 83, 86, 90, 93, 94, 96, 103, 105, 108, 109, 111, 112, 114, 116, 121, 122, 124, 126, 130, 141, 142, 144, 146, 150, 161, 162, 164, 166, 180, 190, 202, 204, 207
Offset: 1

Views

Author

K. D. Bajpai, Jul 28 2015

Keywords

Examples

			a(6) = 17. (1+7) + (1*7) = 8 + 7 = 15 = 3 * 5, which is semiprime.
a(10) = 38. (3+8) + (3*8) = 11 + 24 = 35 = 5 * 7, which is semiprime.
		

Crossrefs

Programs

  • Maple
    with(numtheory):A260523 := proc() local a; a:= (add(d,d=convert(n, base, 10)) + mul(d,d=convert(n, base, 10))  ); if bigomega(a)=2 then RETURN (n); fi; end: seq(A260523 (),n=1..300);
  • Mathematica
    Select[Range[1000], PrimeOmega[(Plus@@IntegerDigits[#]) + (Times@@IntegerDigits[#])] == 2 &]
  • PARI
    for(n=1,500,d=digits(n);s=sumdigits(n);p=prod(i=1,#d,d[i]);if(bigomega(s+p)==2,print1(n,", "))) \\ Derek Orr, Aug 27 2015

A261127 Triangular numbers t such that (sum of digits of t) + (product of digits of t) is a triangular number.

Original entry on oeis.org

0, 3, 10, 105, 120, 136, 190, 210, 300, 406, 703, 780, 820, 1081, 1128, 1431, 1540, 1653, 1770, 1891, 1953, 2080, 2211, 2628, 2701, 2850, 3003, 3160, 3403, 3570, 4560, 4656, 5050, 5460, 7021, 7260, 7503, 8646, 8911, 9453, 10011, 10153, 11026, 12403, 14028, 15400
Offset: 1

Views

Author

K. D. Bajpai, Aug 09 2015

Keywords

Comments

All the terms in this sequence are triangular, and hence 0 or 1 (mod 3).

Examples

			a(6) = 136 = 16 * (16+1) / 2, that is triangular number. (1+3+6) + (1*3*6) = 28, which is 7th triangular number.
a(15) = 1128 = 47 * (47+1) / 2, that is triangular number. (1+1+2+8) + (1*1*2*8) = 28, which is 7th triangular number.
		

Crossrefs

Programs

  • Magma
    [n*(n+1) div 2: n in [0..100] | IsSquare(8*k+1) where k is (&+Intseq(n*(n+1) div 2) + &*Intseq(n*(n+1) div 2))];
  • Maple
    with(numtheory): A261127:= proc() local a,k,t;t:=n*(n+1)/2; a:= (add(d,d=convert(t, base, 10)) + mul(d,d=convert(t, base, 10)));k:=(-1 + sqrt(8*a + 1))/2; if k=floor(k) then RETURN (t); fi; end: seq(A261127 (),n=0..300);
  • Mathematica
    A261127 = {}; Do[t = n*(n + 1)/2; k = Plus @@ IntegerDigits[t] + Times @@ IntegerDigits[t]; If[IntegerQ[( -1 + Sqrt[8*k + 1])/2], AppendTo[A261127, t]], {n,0,1000}]; A261127
  • PARI
    for(n =0, 500, t = n*(n+1)/2; k = (sumdigits(t)); d = digits (t); p = prod(i = 1, #d, d[i]); s = k+p; if(ispolygonal(s,3), print1(t, ", ")));
    

A261560 Semiprimes sp such that (sum of digits of (sp)) + (product of digits of (sp)) is also semiprime.

Original entry on oeis.org

14, 33, 38, 39, 46, 49, 55, 69, 74, 82, 86, 93, 94, 111, 121, 122, 141, 142, 146, 161, 166, 202, 214, 221, 226, 247, 249, 254, 259, 262, 274, 278, 287, 295, 301, 303, 323, 334, 346, 386, 411, 427, 445, 454, 458, 469, 485, 489, 501, 505, 529, 542, 565, 586, 589
Offset: 1

Views

Author

K. D. Bajpai, Aug 24 2015

Keywords

Examples

			a(1) = 14 = (2 * 7), is semiprime. (1+4) + (1*4) = 9 = (3 * 3) is also semiprime.
a(3) = 38 = (2 * 19), is semiprime. (3+8) + (3*8) = 35 = (7 * 5) is also semiprime.
		

Crossrefs

Programs

  • Magma
    IsSemiprime:=func; [n: n in [11..300] | IsSemiprime(n) and IsSemiprime(k) where k is (&+Intseq(n) + &*Intseq(n))];
  • Maple
    with(numtheory): select(n -> bigomega(n)=2 and bigomega( add(d, d=convert(n, base, 10)) + mul(d, d=convert(n, base, 10)) ) = 2, [seq(n, n=1..300)]);
  • Mathematica
    Select[Range[2000], PrimeOmega[#] == 2 && PrimeOmega[(Plus @@ IntegerDigits[#]) + (Times @@ IntegerDigits[#])] == 2 &]
  • PARI
    for(n = 1, 300, d = digits(n); pd = prod(i = 1, #d, d[i]); if(bigomega(n)==2 && bigomega(sumdigits(n) + pd)==2, print1(n,", ")));
    

A235031 The first integer that produces a sequence of n terms without repetition. Any term of the sequence, after the first one, is the sum of PD and SD of the previous term of the sequence. PD is the product of the nonzero digits; SD is the sum of the digits.

Original entry on oeis.org

2, 1, 26, 28, 66, 289, 579, 3468, 23889, 2366688, 45579999, 356688888888, 35888888888888889, 2455566666777777999999999999999
Offset: 17

Author

Carlos Rivera, Jan 02 2014

Keywords

Comments

If X is a previous term of the sequence greater than zero and less than 10, then PD=X and SD=X and so the next term is 2X.
The values of a(n) for n = 1..12 are 19, 34, 46, 177, 458, 2699, 279999, 4557888, 23366667799, 456667788889999, 246666666666666667888999, and 23777777777777777888888888899999999. - Giovanni Resta, Jan 02 2014

Examples

			For n=18: 1, 2, 4, 8, 16, 13, 7, 14, 9, 18, 17, 15, 11, 3, 6, 12, 5, 10.
For n=19: 26, 20, 4, 8, 16, 13, 7, 14, 9, 18, 17, 15, 11, 3, 6, 12, 5, 10, 2.
		

Crossrefs

Programs

  • PARI
    step(n)=my(d=digits(n),D=select(k->k>1,d)); sum(i=1,#d, d[i]) + prod(i=1,#D, D[i])
    len(n)=my(v=Set([n])); while(1,n=step(n); if(setsearch(v,n), return(#v)); v=setunion(v,Set([n])))
    a(n)=my(k);while(len(k++)!=n,); k \\ Charles R Greathouse IV, Jan 02 2014

Extensions

a(17) and a(27)-a(30) from Giovanni Resta, Jan 02 2014
Previous Showing 11-15 of 15 results.