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

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, ", ")));
    

A344032 a(n) is the least prime that begins a sequence of at least n distinct primes under iteration of A061762.

Original entry on oeis.org

2, 11, 23, 53, 12451, 36779999
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, May 07 2021

Keywords

Examples

			12451 is prime and A061762(12451) = 1*2*4*5*1+1+2+4+5+1 = 53.
53 is prime and A061762(53) = 5*3+5+3 = 23.
23 is prime and A061762(23) = 2*3+2+3 = 11.
11 is prime and A061762(11) = 1*1+1+1 = 3.
3 is prime and A061762(3) = 3+3 = 6 is not prime.
Thus 12451 begins a sequence of 5 distinct primes under the iteration of A061762.  Since 12451 is the least such prime, a(5) = 12451.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local L;
       L:= convert(n,base,10);
       convert(L,`+`)+convert(L,`*`)
    end proc:
    g:= proc(n) local S,v;
      S:= {n}:
      v:= n;
      do
        v:= f(v);
        if member(v,S) or not isprime(v) then return nops(S) fi;
        S:= S union {v}
      od
    end proc:
    R:= NULL: p:= 1: m:= 0:
    while m < 5 do
      p:= nextprime(p);
      v:= g(p);
      if v > m then R:= R, p$(v-m); m:= v fi
    od:
    R;
Showing 1-3 of 3 results.