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

A061763 Numbers k such that k is divisible by A061762(k) and the product of digits of k (A007954(k)) is not zero.

Original entry on oeis.org

19, 29, 39, 42, 49, 59, 69, 79, 89, 99, 126, 132, 285, 312, 522, 594, 1134, 1144, 1159, 1211, 1275, 1323, 1365, 1573, 1632, 1634, 1674, 1715, 1813, 1815, 1911, 1919, 1932, 1944, 2133, 2139, 2516, 2793, 3132, 3135, 3161, 3211, 3213, 3216, 3321, 3363, 3393
Offset: 1

Views

Author

Amarnath Murthy, May 20 2001

Keywords

Comments

Intersection of A038366 and A052382 (zeroless numbers). - Michel Marcus, Oct 29 2019

Examples

			42 is a term as 4+2 + 2*4 = 14 and 42 = 14*3.
		

References

  • S. Parmeswaran, S+P numbers, Mathematics Informatics Quarterly, Vol. 9, No. 3 Sept. 1999, Bulgaria.

Crossrefs

Programs

  • Mathematica
    Select[Range[3400], (y = Times @@ (x = IntegerDigits[#])) != 0 && Divisible[#, Plus @@ x + y] &] (* Jayanta Basu, Jul 14 2013 *)
  • PARI
    isok(k) = my(d=digits(k)); vecmin(d) && ((k % (vecprod(d) + vecsum(d))) == 0);

Extensions

Corrected and extended by Larry Reeves (larryr(AT)acm.org), May 23 2001
Offset corrected by Giovanni Resta, Oct 29 2019

A130858 Smallest k such that A061762(k) = n.

Original entry on oeis.org

0, 10, 1, 11, 2, 12, 3, 13, 4, 14, 5, 15, 6, 16, 7, 17, 8, 18, 9, 19, 26, 126, 1126, 27, 44, 144, 28, 36, 136, 29, 129, 37, 137, 234, 46, 38, 138, 1138, 11138, 39, 139, 56, 156, 1156, 48, 148, 334, 57, 66, 49, 149, 245, 1245, 58, 158, 67, 167, 1167, 11167, 59
Offset: 0

Views

Author

Zak Seidov and Giovanni Resta, Aug 22 2007

Keywords

A344021 Numbers k such that A061762(k) and k+A061762(k) are both prime.

Original entry on oeis.org

1, 12, 16, 32, 34, 54, 56, 78, 104, 106, 160, 232, 236, 250, 252, 298, 302, 304, 326, 328, 340, 362, 382, 388, 474, 490, 502, 508, 526, 560, 580, 610, 650, 656, 670, 676, 706, 740, 760, 838, 850, 890, 898, 928, 940, 980, 1004, 1006, 1024, 1028, 1042, 1048, 1082, 1084, 1152, 1190, 1192, 1246, 1248
Offset: 1

Views

Author

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

Keywords

Examples

			a(3) = 16 is a term because A061762(16) = 1*6+1+6=13 is prime and 16+13=29 is prime.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local L;
    L:= convert(n,base,10);
    convert(L,`*`)+convert(L,`+`);
    end proc:
    filter:= proc(n) local t; t:= f(n); isprime(t) and isprime(n+t) end proc:
    select(filter, [1,seq(i,i=2..10000,2)]);

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;

A038366 n is divisible by (product of digits) + (sum of digits).

Original entry on oeis.org

10, 19, 20, 29, 30, 39, 40, 42, 49, 50, 59, 60, 69, 70, 79, 80, 89, 90, 99, 100, 102, 108, 110, 120, 126, 132, 140, 150, 180, 190, 200, 201, 204, 207, 209, 210, 220, 230, 240, 270, 280, 285, 300, 306, 308, 312, 320, 330, 360, 370, 400, 402, 405, 407, 408, 410
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[410], Divisible[#, Plus @@ (x = IntegerDigits[#]) + Times @@ x] &] (* Jayanta Basu, Jul 14 2013 *)
  • PARI
    isok(m) = my(d=digits(m)); (m % (vecprod(d) + vecsum(d))) == 0; \\ Michel Marcus, Oct 29 2019
    
  • Python
    from math import prod
    def ok(n): d = list(map(int, str(n))); return n and n%(sum(d)+prod(d)) == 0
    print([k for k in range(411) if ok(k)]) # Michael S. Branicky, Oct 19 2021

A036120 a(n) = 2^n mod 19.

Original entry on oeis.org

1, 2, 4, 8, 16, 13, 7, 14, 9, 18, 17, 15, 11, 3, 6, 12, 5, 10, 1, 2, 4, 8, 16, 13, 7, 14, 9, 18, 17, 15, 11, 3, 6, 12, 5, 10, 1, 2, 4, 8, 16, 13, 7, 14, 9, 18, 17, 15, 11, 3, 6, 12, 5, 10, 1, 2, 4, 8, 16, 13, 7, 14, 9, 18, 17, 15
Offset: 0

Views

Author

Keywords

Comments

The sequence can be generated via a(n) = A061762(a(n-1)). Apparently any other choice of the first element leads also to periodic sequences, with fixed points of A061762 as special cases. - Zak Seidov, Aug 22 2007

References

  • I. M. Vinogradov, Elements of Number Theory, pp. 220 ff.

Crossrefs

CF. A000079 (2^n).

Programs

  • GAP
    List([0..60],n->PowerMod(2,n,19)); # Muniru A Asiru, Oct 17 2018
  • Magma
    [Modexp(2, n, 19): n in [0..100]]; // G. C. Greubel, Oct 17 2018
    
  • Maple
    with(numtheory) ; i := pi(19) ; [ seq(primroot(ithprime(i))^j mod ithprime(i), j=0..100) ];
  • Mathematica
    PowerMod[2, Range[0, 100], 19] (* G. C. Greubel, Oct 17 2018 *)
  • PARI
    a(n)=lift(Mod(2,19)^n) \\ Charles R Greathouse IV, Mar 22 2016
    
  • Python
    for n in range(0, 100): print(int(pow(2, n, 19)), end=' ') # Stefano Spezia, Oct 17 2018
    
  • Sage
    [power_mod(2,n,19) for n in range(0,66)] # Zerinvary Lajos, Nov 03 2009
    

Formula

a(n)= +a(n-1) -a(n-9) +a(n-10). - R. J. Mathar, Apr 13 2010
G.f.: (1+x+2*x^2+4*x^3+8*x^4-3*x^5-6*x^6+7*x^7-5*x^8+10*x^9)/ ((1-x) * (1+x) * (x^2- x+1) * (x^6-x^3+1)). - R. J. Mathar, Apr 13 2010
a(n) = a(n+18). - Vincenzo Librandi, Sep 09 2011

A214629 Primes p such that the sum of the digits plus the product of the digits is a prime.

Original entry on oeis.org

11, 13, 19, 23, 29, 31, 37, 43, 53, 59, 61, 73, 79, 89, 97, 101, 223, 263, 283, 401, 409, 443, 601, 607, 809, 823, 829, 883, 1013, 1019, 1031, 1033, 1039, 1051, 1091, 1093, 1097, 1103, 1109, 1117, 1123, 1129, 1151, 1163, 1171, 1181, 1187, 1193, 1213, 1231, 1259
Offset: 1

Views

Author

Keywords

Examples

			11 is in the sequence because A061762(11) = 3 is prime.
		

Crossrefs

Cf. A061762, A344032. Primes in A185300.

Programs

  • Maple
    f:= proc(n) local L;
       L:= convert(n,base,10);
       convert(L,`+`)+convert(L,`*`)
    end proc:
    select(p -> isprime(f(p)), [seq(ithprime(i),i=1..1000)]); # Robert Israel, May 07 2021
  • Mathematica
    f[n_] := Module[{in = IntegerDigits[n]}, Times @@ in + Plus @@ in];Select[Prime[Range[300]], PrimeQ[f[#]] &]

Formula

{p in A000040: A061762(p) in A000040}. - R. J. Mathar, Aug 13 2012

A171772 Number of steps needed to reach a prime when the map S(n)+M(n) is applied to n, or -1 if a prime is never reached. Here S(n) and M(N) mean the sum and the product of the digits of n in base 10.

Original entry on oeis.org

1, 0, 0, 3, 0, 2, 0, 2, 2, 2, 0, 1, 0, 3, 1, 1, 0, 1, 0, 1, 1, 3, 0, 4, 1, 2, 1, 3, 0, 1, 0, 1, 2, 1, 1, 2, 0, 2, -1, 4, 0, 4, 0, 5, 1, 2, 0, 6, -1, 1, 1, 1, 0, 1, 2, 1, 1, 1, 0, 3, 0, 2, 2, 2, 1, 7, 0, 3, -1, 1, 0, 1, 0, -1, 1, 3, 3, 1, 0, 3
Offset: 1

Views

Author

R. J. Mathar, Oct 12 2010

Keywords

Comments

a(n)=0 if n is a prime.

Examples

			a(4)=3 because 4->8->16->13 is prime.
a(39)=-1 because 39 -> 39 ->39 ... never reaches a prime.
a(49)=-1 because 49 -> 49 ->49 ... never reaches a prime.
a(69)=-1 because 69 -> 69 ->69 ... never reaches a prime.
a(74)=-1 because 74 -> 39 ->39 ... never reaches a prime.
a(28)=3 because 28 ->26 ->20 ->2.
		

Crossrefs

A variant of A074871.

Programs

  • Maple
    f:= proc(n) local L;
      L:= convert(n,base,10);
      convert(L,`+`)+convert(L,`*`);
    end proc:
    g:= proc(n) option remember; local v,w;
         if n::prime then return 0 fi;
         v:= f(n);
         if v = n then return -1 fi;
         w:= procname(v);
         if w = -1 then -1 else w+1 fi
    end proc:
    map(g, [$1..100]); # Robert Israel, Nov 03 2019

A249121 a(n) = n - (sum of digits of n) - (product of digits of n).

Original entry on oeis.org

0, -1, -2, -3, -4, -5, -6, -7, -8, -9, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 18, 16, 14, 12, 10, 8, 6, 4, 2, 0, 27, 24, 21, 18, 15, 12, 9, 6, 3, 0, 36, 32, 28, 24, 20, 16, 12, 8, 4, 0, 45, 40, 35, 30, 25, 20, 15, 10, 5, 0, 54, 48, 42, 36, 30, 24, 18, 12, 6, 0, 63, 56, 49, 42, 35, 28, 21, 14, 7, 0, 72, 64, 56
Offset: 0

Views

Author

Zak Seidov, Oct 21 2014

Keywords

Comments

In the graph, the upper bound is the line:
a(10*m) = 9m: a(10) = 9, a(20) = 18, a(30) = 27,...

Crossrefs

Programs

  • Maple
    a:= n-> (l-> n-add(i, i=l)-mul(i, i=l))(convert(n, base, 10)):
    seq(a(n), n=0..120); # Alois P. Heinz, Oct 22 2014
  • Mathematica
    Table[id = IntegerDigits[n]; n - (Plus @@ id) - (Times @@ id), {n, 0, 200}]
  • PARI
    a(n)=d=digits(n);if(!n,return(0));n-sumdigits(n)-prod(i=1,#d,d[i])
    vector(100,n,a(n-1)) \\ Derek Orr, Oct 21 2014

Formula

a(n) = n - A007953(n) - A007954(n) = A001477(n) - A061762(n).

A185400 Numbers with property that the digital sum plus the product of the digits is a power of 2.

Original entry on oeis.org

1, 2, 4, 8, 10, 20, 22, 40, 80, 100, 101, 103, 107, 110, 111, 113, 117, 130, 131, 133, 137, 170, 171, 173, 177, 200, 202, 206, 220, 260, 301, 305, 310, 311, 313, 317, 331, 350, 371, 400, 404, 440, 503, 530, 602, 620, 701, 709, 710, 711, 713, 717, 731, 771, 790, 800, 808, 880, 907, 970, 1000, 1001, 1003, 1007, 1010, 1012, 1016
Offset: 1

Views

Author

Michel Lagneau, Feb 03 2011

Keywords

Examples

			371 is in the sequence because (3+7+1) + (3*7*1) = 11 + 21 = 32 = 2^5.
116291 is in the sequence because (1+1+6+2+9+1) + (1*1*6*2*9*1) = 20 + 108 = 128 = 2^7.
		

Crossrefs

Cf. A061762.

Programs

  • Maple
    A007953 := proc(n) add(d,d=convert(n,base,10)) ; end proc:
    A007954 := proc(n) mul(d,d=convert(n,base,10)) ; end proc:
    A061762 := proc(n) A007953(n)+A007954(n) ; end proc:
    isA000079 := proc(n) if n < 1 then false; elif n = 1 then true; else if type(n,'even') then is( nops(numtheory[factorset](n)) = 1) ; else false; end if; end if; end proc:
    isA185400 := proc(n) isA000079(A061762(n)) ; end proc:
    for n from 1 to 1300 do if isA185400(n) then printf("%a,",n) ; end if; end do: # R. J. Mathar, Feb 08 2011
  • Mathematica
    pwrs2Q[n_]:=Module[{idn=IntegerDigits[n],x,y},x=Total[idn]+Times@@idn;y=Round[Log[x]/Log[2]];2^y==x]
    Select[Range[1100],pwrs2Q]  (* Harvey P. Dale, Feb 16 2011 *)
Showing 1-10 of 15 results. Next