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: Andy Edwards

Andy Edwards's wiki page.

Andy Edwards has authored 8 sequences.

A256556 If n = 10k+m (0 <= m <= 9) then a(n) = n*k^m.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 42, 88, 184, 384, 800, 1664, 3456, 7168, 14848, 30, 93, 288, 891, 2754, 8505, 26244, 80919, 249318, 767637, 40, 164, 672, 2752, 11264, 46080, 188416, 770048, 3145728, 12845056, 50, 255, 1300, 6625
Offset: 1

Author

Andy Edwards, Apr 01 2015

Keywords

Examples

			10 yields 10*(1^0) = 10;
43 yields 43*(4^3)= 43*64=2754;
68 yields 68*(6^8)= 68*1679616 = 114213888.
		

Programs

  • Haskell
    a256556 n = n * uncurry (^) (divMod n 10)
    -- Reinhard Zumkeller, May 02 2015
  • Maple
    f:=proc(n) local k,m; m := (n mod 10); k := (n-m)/10; n*k^m; end;
    [seq(f(n),n=1..40)];

Extensions

Entry revised by N. J. A. Sloane, May 02 2015

A188454 Numbers n whose decimal digits are distinct and no digit divides n.

Original entry on oeis.org

23, 27, 29, 34, 37, 38, 43, 46, 47, 49, 53, 54, 56, 57, 58, 59, 67, 68, 69, 73, 74, 76, 78, 79, 83, 86, 87, 89, 94, 97, 98, 203, 207, 209, 239, 247, 249, 253, 257, 259, 263, 267, 269, 283, 289, 293, 307, 308, 329, 346, 347, 349, 356, 358, 359, 367, 370, 374
Offset: 1

Author

Andy Edwards, Mar 31 2011

Keywords

Comments

These may not contain 1 or have a 2 or 5 as the last digit. They include prime numbers not containing the digit 1 and composites with a smallest prime factor > 10 and obeying the other constraints (e.g. the largest case is 987654203 = 31*31859813).
The first even case is 34. The first consecutive pair is {37, 38}. {56,57,58,59} is a consecutive quadruple which is the maximal size for such a subset.
There are 202623 terms in this sequence. - Nathaniel Johnston, May 19 2011

Crossrefs

Programs

  • Mathematica
    dddQ[n_]:=Module[{dcn=DigitCount[n]},Max[dcn]==1&&First[dcn]==0 && Union[ Divisible[n,Select[IntegerDigits[n],#!=0&]]]=={False}]; Select[Range[ 400],dddQ] (* Harvey P. Dale, May 01 2012 *)

A117076 Prime numbers with more even digits than odd digits.

Original entry on oeis.org

2, 223, 227, 229, 241, 263, 269, 281, 283, 401, 409, 421, 443, 449, 461, 463, 467, 487, 601, 607, 641, 643, 647, 661, 683, 809, 821, 823, 827, 829, 863, 881, 883, 887, 2003, 2027, 2029, 2063, 2069, 2081, 2083, 2087, 2089, 2203, 2207, 2221, 2243, 2267, 2269
Offset: 1

Author

Andy Edwards, Apr 18 2006

Keywords

Comments

If a prime number's even digits are to outnumber its odd digits, it may not have two digits (as its last digit must be odd.) Neither may it begin with an odd digit if it has three or four digits. The smallest member of this sequence to begin with an odd digit is 10007.

Examples

			64969 is a member of this sequence as it is a prime with 3 even and only two odd digits. The primes on either side of it - 64951 and 64997 - are both non-members.
		

Programs

  • Mathematica
    Select[Prime[Range[1000]],Sum[DigitCount[ # ][[2i - 1]], {i, 1,5}] < Sum[DigitCount[ # ][[2i]], {i, 1, 5}] &] (* Stefan Steinerberger, Apr 18 2006 *)
    metoQ[n_]:=Module[{idn=IntegerDigits[n]},Count[idn,?EvenQ]>Count[idn, ?OddQ]]; Select[Prime[Range[350]],metoQ] (* Harvey P. Dale, Oct 10 2018 *)
  • PARI
    select( {is_A117076(n)=isprime(n)&&vecsum(n=digits(n)%2)*2<#n}, primes(500)) \\ M. F. Hasler, Jul 03 2022

Extensions

More terms from Stefan Steinerberger, Apr 18 2006

A115569 Lynch-Bell numbers: numbers n such that the digits are all different (and do not include 0) and n is divisible by each of its individual digits.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 15, 24, 36, 48, 124, 126, 128, 132, 135, 162, 168, 175, 184, 216, 248, 264, 312, 315, 324, 384, 396, 412, 432, 612, 624, 648, 672, 728, 735, 784, 816, 824, 864, 936, 1236, 1248, 1296, 1326, 1362, 1368, 1395, 1632, 1692, 1764, 1824
Offset: 1

Author

Mike Smith (mtm_king(AT)yahoo.com), Mar 10 2006; also submitted by Andy Edwards (AndynGen(AT)aol.com), Mar 20 2006

Comments

This is a subset of some of the related sequences listed below. Stephen Lynch and Andrew Bell are Brisbane surgeons who contributed to the identification of this sequence.
There are 548 Lynch-Bell numbers. A117911 gives the number of n-digit ones. The digit 5 cannot appear in Lynch-Bell numbers containing an even digit; 5 must be the units digit when it appears. The 7-digit Lynch-Bell numbers are 105 permutations of 1289736 (the smallest such). - Rick L. Shepherd, Apr 01 2006
Can be seen/read as a table with row lengths A117911 (rows r > 7 have zero length). - M. F. Hasler, Jan 31 2016

Examples

			384/3 = 128, 384/8 = 48, 384/4 = 96. Thus 384 is Lynch-Bell as it is a multiple of each of its three distinct digits.
		

Crossrefs

Cf. A117911, A117912 (have even digits only), A117913 (have odd digits only), A010784.

Programs

  • Maple
    with(combinat):
    f:= l-> parse(cat(l[])):
    T:= n-> sort(map(f, select(l-> andmap(x-> irem(f(l), x)=0, l),
             map(p-> permute(p)[], choose([$1..9], n)))))[]:
    seq(T(n), n=1..7);  # Alois P. Heinz, Jul 31 2022
  • Mathematica
    Reap[For[n = 1, n < 10^7, n++, id = IntegerDigits[n]; If[FreeQ[id, 0] && Length[id] == Length[Union[id]] && And @@ (Divisible[n, #]& /@ id), Print[n]; Sow[n]]]][[2, 1]] (* Jean-François Alcover, Nov 26 2013 *)
    bnQ[n_]:=Max[DigitCount[n]]==1&&FreeQ[IntegerDigits[n],0]&&Union[Divisible[n,IntegerDigits[ n]]]=={True}; Select[Range[2000],lbnQ] (* Harvey P. Dale, Jun 02 2023 *)
    Cases[Union @@ ((FromDigits@#&/@Flatten[Permutations@# & /@ Subsets[Range@9, {#}], 1])&/@ Range@9), ?(DeleteDuplicates[Divisible[#, IntegerDigits@#]] == {True} &)] (* _Hans Rudolf Widmer, Aug 27 2024 *)
  • PARI
    A115569_row(n)={if(n,my(u=vectorv(n,i,10^i)\10,S=List(),M);forvec(v=vector(n,i,[1,9]),(M=lcm(v))%10==0||normlp(v,1)%3^valuation(M,3)||for(k=1,n!,vecextract(v,numtoperm(n,k))*u%M ||listput(S,vecextract(v,numtoperm(n,k))*u)),2);Set(S),concat(apply(A115569_row,[1..7])))} \\ Return terms of length n if given, else the vector of all terms. The checks M%10 and |v| % 3^v(...) are not needed but reduce CPU time by 97%. - M. F. Hasler, Jan 31 2016
    
  • PARI
    A115569(n)=n>9&&for(r=2,7,(n-=#t=A115569_row(r))>9||return(t[n-9+#t]));n \\ M. F. Hasler, Jan 31 2016
    
  • Python
    def ok(n):
        s = str(n)
        if "0" in s or len(set(s)) < len(s): return False
        return all(n%int(d) == 0 for d in s)
    afull = [k for k in range(9867313) if ok(k)]
    print(afull[:55]) # Michael S. Branicky, Jul 31 2022

Extensions

The full list of terms was sent in by Rick L. Shepherd (see link) and also by Sébastien Dumortier, Apr 04 2006

A090976 a(n) = 100 reduced mod n.

Original entry on oeis.org

0, 0, 1, 0, 0, 4, 2, 4, 1, 0, 1, 4, 9, 2, 10, 4, 15, 10, 5, 0, 16, 12, 8, 4, 0, 22, 19, 16, 13, 10, 7, 4, 1, 32, 30, 28, 26, 24, 22, 20, 18, 16, 14, 12, 10, 8, 6, 4, 2, 0, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21
Offset: 1

Author

Andy Edwards (AndynGen(AT)aol.com), Feb 28 2004

Keywords

Examples

			a(17)= 15 because [100/17] = 5, remainder is 15 (17*5 = 85, 100-85 = 15).
		

Programs

Formula

a(n) = 100 - n*[100/n] where [x] = floor.
a(n) = 100 for n > 100.

Extensions

More terms from David Wasserman, Feb 23 2006

A087480 Sum of all the primes raised to their corresponding powers.

Original entry on oeis.org

2, 11, 136, 2537, 163588, 4990397, 415329070, 17398892111, 1818551553574, 422525784853775, 25831002681258606, 6608783008521293887, 931711885323534923208, 74817069229462038688657
Offset: 1

Author

Andy Edwards (AndynGen(AT)aol.com), Sep 09 2003

Keywords

Examples

			a(4) = 2^1 + 3^2 + 5^3 + 7^4 = 2 + 9 + 125 + 2401 = 2537.
		

Crossrefs

Partial sums of A062457.

Programs

  • Maple
    ListTools:-PartialSums( [seq(ithprime(i)^i, i=1..100)]); # Robert Israel, Nov 09 2015
  • Mathematica
    a[1] = 2; a[n_] := a[n - 1] + Prime[n]^n; Table[a[n], {n, 15}] (* Carlos Eduardo Olivieri, Nov 09 2015 *)
    Accumulate[Table[Prime[n]^n,{n,20}]] (* Harvey P. Dale, May 11 2019 *)
  • PARI
    a(n) = sum(i=1, n, prime(i)^i); \\ Michel Marcus, Sep 05 2013

Formula

a(n) = a(n-1) + prime(n)^n where prime(n) is the n-th prime.

Extensions

Corrected and extended by Ray Chandler, Sep 14 2003

A072843 O'Halloran numbers: even integers which cannot be the surface area of a cuboid with integer-length sides.

Original entry on oeis.org

8, 12, 20, 36, 44, 60, 84, 116, 140, 156, 204, 260, 380, 420, 660, 924
Offset: 0

Author

Andy Edwards (AndynGen(AT)aol.com), Jul 24 2002

Keywords

Comments

Named to commemorate the founder of the Australian Mathematics Competition, Peter O'Halloran, shortly before his untimely death in 1994.

Examples

			The total surface areas of the smallest possible cuboids (1.1.1), (2.1.1),(2.2.1),(3.1.1) and (4.1.1) are, respectively, 6, 10, 16, 14 and 18 square units, assuming their side lengths are whole numbers. Thus the first two O'Halloran Numbers are 8 and 12 as they do not appear on this list of areas.
		

References

  • A. Edwards - "The Cellars At The Hotel Mathematics" - Keynote article in "Mathematics - Imagine The Possibilities" (Conference handbook for the MAV conference - 1997) pp. 18-19

A072274 List of Ormiston prime pairs.

Original entry on oeis.org

1913, 1931, 18379, 18397, 19013, 19031, 25013, 25031, 34613, 34631, 35617, 35671, 35879, 35897, 36979, 36997, 37379, 37397, 37813, 37831, 40013, 40031, 40213, 40231, 40639, 40693, 45613, 45631, 48091, 48109, 49279, 49297, 51613, 51631, 55313, 55331, 56179, 56197
Offset: 1

Author

Andy Edwards (AndynGen(AT)aol.com), Jul 09 2002

Keywords

Comments

Given the n-th prime, it is occasionally possible to form the (n+1)th prime using the same digits in a different order. Such a pair is an Ormiston Pair.
Ormiston Pairs occur rarely but randomly. It is thought that there are infinitely many but this has not been proved. They always differ by a multiple of 18. Ormiston Triples may exist but must be very large.
The smallest Ormiston triple is (11117123, 11117213, 11117321), the smallest Ormiston quadruple is (6607882123, 6607882213, 6607882231, 6607882321); see Andersen link. - Klaus Brockhaus, Jul 22 2009
The current wording of the definition suggests that the second member of Ormiston prime triples (cf. A075093) is repeated. Indeed, such a triple (p,q,r) corresponds to two pairs (a(2k-1)=p,a(2k)=q) and (a(2k+1)=q,a(2k+2)=r). (If they were listed as ...,p,q,r,..., then the sequence would still contain both pairs as (non-disjoint) subsequences. But if that was the intended meaning, then one would prefer the title "Members of O. prime pairs" (or simply O. primes?). Under this assumption, a(n)=a(n+1) iff a(n-1)=A075093(k) (for some k) is the smallest member of an Ormiston prime triple (a(n-1), a(n)=a(n+1), a(n+2)). In particular this is the case for the first two elements of Ormiston quadruples, cf. A161160. - M. F. Hasler, Oct 11 2012
The term "Ormiston pair" was coined by Andy Edwards in 2002 after Ormiston College in Queensland, Australia. - Amiram Eldar, Nov 25 2020

Examples

			Although 179 and 197 are composed of the same digits, they do not form an Ormiston Pair as several other primes intervene (i.e. 181, 191, 193.)
		

Crossrefs

Cf. A069567.
Cf. A075093 (smallest member of Ormiston prime triple), A161160 (smallest member of Ormiston prime quadruple).

Programs

  • Magma
    &cat[ [ p, q ]: p in PrimesUpTo(52000) | (q-p) mod 18 eq 0 and a eq b where a is Sort(Intseq(p)) where b is Sort(Intseq(q)) where q is NextPrime(p) ]; // Klaus Brockhaus, Jul 22 2009
    
  • Mathematica
    a = {1}; b = {2}; Do[b = Sort[ IntegerDigits[ Prime[n]]]; If[a == b, Print[ Prime[n - 1], ", ", Prime[n]]]; a = b, {n, 1, 10^4}]
  • PARI
    is(n)=if(!isprime(n), return(0)); my(d=vecsort(digits(n))); vecsort(digits(precprime(n-1)))==d || vecsort(digits(nextprime(n+1)))==d \\ Charles R Greathouse IV, Mar 07 2016
    
  • Python
    from sympy import nextprime
    from itertools import islice
    def agen(): # generator of terms
        p, hp, q, hq = 2, "2", 3, "3"
        while True:
            if hp == hq: yield from [p, q]
            p, q = q, nextprime(q)
            hp, hq = hq, "".join(sorted(str(q)))
    print(list(islice(agen(), 38))) # Michael S. Branicky, Feb 19 2024

Formula

a(2k-1)=A069567(k); a(2k)=nextprime(a(2k-1)+1). - M. F. Hasler, Oct 13 2012

Extensions

Edited and corrected by Robert G. Wilson v, Jul 15 2002